How to send friend request using Facebook dialogs on Android?

前端 未结 2 978
佛祖请我去吃肉
佛祖请我去吃肉 2020-12-17 06:31

I want tot send a friend request using the Facebook Android SDK. I\'m currently using this code (which I got from here):

Bundle parameters = new Bundle();
pa         


        
2条回答
  •  感情败类
    2020-12-17 06:45

    Should be something like:

    Bundle parameters = new Bundle();
    parameters.putString("id", USER_ID);
    facebook.dialog(this, "friends", parameters, this);
    

    In case that this is an activity which also implements DialogListener.

    As it says in the documentation:

    app_id - Your application's identifier. Required, but automatically specified by most SDKs.
    id - Required. The ID or username of the target user to add as a friend.

提交回复
热议问题