Prompt the user to add a friend. If the friend had previously sent a request to the user, then the dialog allows the user to confirm the friend instead of sending a new friend request.
app_id | Your application's identifier. Required, but automatically specified by most SDKs. |
redirect_uri | The URL to redirect to after the user clicks a button on the dialog. Required, but automatically specified by most SDKs. |
display | The display mode in which to render the dialog. The default is |
id | Required. The ID or username of the target user to add as a friend. |
action | A boolean that is set to 1 if the friend was added, and 0 otherwise. |
This feature is intended to help users become friends on Facebook with people that they are connected to in real life. You should not use this feature to encourage users to friend other users that they are not connected to in real life. If your app is found to be encouraging this behavior, your usage of this feature may be disabled.
Direct the user's browser to
http://www.facebook.com/dialog/friends/?
id=brent&
app_id=123050457758183&
redirect_uri=http://www.example.com/response/
Click here to try the URL yourself. The user will see a dialog that looks like the following:

If the user clicks "Add Friend", the browser will redirect to
http://www.example.com/response/?action=1
If the user clicks "Cancel", the browser will redirect to
http://www.example.com/response/?action=0