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() {
}
}