Facebook: Can I add a friend programmatically?

Is there a Facebook API to add a friend? I can’t find him, but then I can’t find anywhere in him that he is not, and this is similar to what many asked.

(Note: I'm not talking about the Facebook application, but rather about the HTTP interface.)

Explanation

I must mention that I am trying to do this with user authorization. They give me their username and password. Do not try to spam anyone.

Twitter has a very simple API for this; I was hoping Facebook would do that too.

+5
source share
4 answers

, . . , , , .

Edit: facebook. facebook . api / facebook.

+4

, , .

API Javascript Facebook, :

<script>
    FB.ui(
     { 
      method: 'friends.add', 
      id: fbid // assuming you set this variable previously...
     }, 
     function(param){

      console.log(param);

            // If they cancel params will show: 
            //    {action:false, ...}
            // and if they send the friend request it'll have:
            //    {action:true, ...}
            // and if they closed the pop-up window then:
            //    param is undefined
     }
    );
</script>

script ajax , , .

, javascript Facebook:

http://developers.facebook.com/tools/console

script , , "", "fb.ui - friends.add".

+2

. , .

Snoopy - .

0

, , Pass User.

, , /XML . , facebook.

, . , myFriends ( ​​ ).

FBUserId

9705 1215966620

9706 1248090545
9707 1251036547
9708 1252800907 9709 1263680515 Binayan Dey 9710 1275860308 9711 1279017492 9712 1280150772 9713 1287414234 প্রব া সী স া র ো য় া র 9714 1294159220 . 9715 1294340379

0

All Articles