Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8395429
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 9, 20262026-06-09T20:17:55+00:00 2026-06-09T20:17:55+00:00

I am trying to integrate Facebook ** into my android app. I want to

  • 0

I am trying to integrate Facebook ** into my android app. I want to implement **like and share ** facility on **facebook. But i am getting error.
Facebook Error

please help me to solve this.

Also I want to know the process of creating New App on Facebook.

I am using code from GitHub. My code is –

public class MyGreatActivity extends Activity {

    Facebook facebook = new Facebook("333778590046892");

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_main);

        facebook.authorize(this, new String[] { "offline_access", "publish_stream", "raj21kadam@gmail.com" },
new DialogListener() {
            @Override
            public void onComplete(Bundle values) {
             String token=facebook.getAccessToken();  //get access token
//             Toast.makeText(this, "token", Toast.LENGTH_LONG).
                save(token);
            }

            @Override
            public void onFacebookError(FacebookError error) {}

            @Override
            public void onError(DialogError e) {}

            @Override
            public void onCancel() {}
        });
    }

    @Override
    public void onActivityResult(int requestCode, int resultCode, Intent data) {
        super.onActivityResult(requestCode, resultCode, data);

        facebook.authorizeCallback(requestCode, resultCode, data);
    }

    private void save(String token){
     Toast.makeText(this, "token"+token, Toast.LENGTH_LONG).show();
     SharedPreferences prefs = PreferenceManager.getDefaultSharedPreferences(this);
     prefs.edit().putString("Token", token).commit();
     }
}

I am getting the following error while running the above code –

Dialog Errorcom.facebook.android.DialogError: The connection to the server was unsuccessful.
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-09T20:17:57+00:00Added an answer on June 9, 2026 at 8:17 pm

    try this Single Sign On (SSO) Using Android Native Client For Facebook .
    paste this

    facebook.authorize(this, new DialogListener() {
    
    @Override
            public void onComplete(Bundle values) {
             String token=facebook.getAccessToken();  //get access token
    //             Toast.makeText(this, "token", Toast.LENGTH_LONG).
                save(token);
            }
    
            public void onFacebookError(FacebookError error) {}
    
            @Override
            public void onError(DialogError e) {}
    
            @Override
            public void onCancel() {}
        });
    }
    

    instead of this

    facebook.authorize(this, new String[] { "offline_access", "publish_stream",   "raj21kadam@gmail.com" },
    new DialogListener() {
            @Override
            public void onComplete(Bundle values) {
             String token=facebook.getAccessToken();  //get access token
    
            }
    
            @Override
            public void onFacebookError(FacebookError error) {}
    
            @Override
            public void onError(DialogError e) {}
    
            @Override
            public void onCancel() {}
        });
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to integrate Facebook into my Android Java app, what I want it
I am trying to integrate facebook capabilities into my Android app. So, I have
I'm trying to integrate the Facebook Android SDK in my app, but I can't
I've been trying to integrate Facebook Credit purchases into my app, but any call
I am trying to integrate the Facebook into my application, but when i am
So I am trying to integrate the facebook iOS api into my iphone app.
I am trying to integrate Facebook to my Android app for social post. I
I'm trying to integrate a Facebook send button into my site using Facebook app.
I am trying to integrate Facebook into my app and have already implemented MGTwitterEngine
I'm very new to yii, and I'm trying to integrate the facebook-wall-like style into

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.