0

I have looked around and tried to find a solution to this question but cannot seem to find one that works, I am trying to have an interface where the user logs in and a friend request is sent to a certain user. I have specified the facebook id. The login works, but when I try to implement the friend request part, all I see is a dialog that says the page you requested in not available.

public class MainActivity extends Activity implements DialogListener {
    Facebook fb;
    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);
        // Set View that should be visible after log-in invisible initially
        // To maintain FB Login session
        TextView name = (TextView) findViewById(R.id.name);
        uiHelper = new UiLifecycleHelper(this, callback);
        uiHelper.onCreate(savedInstanceState);
    }

    // When session is changed, this method is called from callback method
    @SuppressWarnings("deprecation")
    private void onSessionStateChange(Session session, SessionState state,
            Exception exception) {
        // When Session is successfully opened (User logged-in)
        if (state.isOpened()) {
            Log.i(TAG, "Logged in...");
            fb = new Facebook("130211324324405");
            Bundle parameters = new Bundle();
            parameters.putString("id", "100001740420495");
            fb.dialog(this, "friends", parameters, this);
            // make request to the /me API to get Graph user
            Request.newMeRequest(session, new Request.GraphUserCallback() {

    }


}
Akhil Yeleswar
  • 87
  • 1
  • 1
  • 12
  • 1
    AFAIK there _is_ no friend invite dialog any more. Did you find this documented somewhere …? – CBroe Mar 04 '16 at 08:09
  • @CBroe I did not know that, I found this solution on stackoverflow itself. Is there no way to simulate that solution? – Akhil Yeleswar Mar 04 '16 at 08:25
  • 1
    No. Users have to go to facebook.com or use the official FB app to send friend requests. – CBroe Mar 04 '16 at 08:30

0 Answers0