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

  • SEARCH
  • Home
  • 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 6779679
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T16:24:52+00:00 2026-05-26T16:24:52+00:00

So I have been trying to run the Facebook Connect example for PhoneGap /

  • 0

So I have been trying to run the Facebook Connect example for PhoneGap / Android with no luck.
https://github.com/davejohnson/phonegap-plugin-facebook-connect *

There are some similar threads with the same problem.. conclusion is that “Facebook SDK is a moving point”

I have succesfully compiled previously apps using phoneGap & Eclipse.
Now following the example* for Android. If I do exactly what they suggest. App shows the buttons but nothing happens when I click on them.

After analyzing the code I have noticed that

function initFB(){
try {
    FB.init({ appId: "45253452345234523", nativeInterface: PG.FB });
    document.getElementById('data').innerHTML = "";
  } catch (e) {
    alert(e);
  }
}

there is a parameter nativeInterface : PG.FB which is nowhere described within Facebook API for this call..
http://developers.facebook.com/docs/reference/javascript/FB.init/

what is more interesting is that when i remove this parameter.. suddenly Login button goes to Facebook page with Error Code API 191.

So my question is what this parameter is supposed to do? and why it is not in Facebook API?

I have found no info about this parameter in internet. I guess if it would be a case of an out-dated FB API there would be some info available.

Any ideas?

Thanks,

Marcin

  • 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-05-26T16:24:52+00:00Added an answer on May 26, 2026 at 4:24 pm

    The “nativeInterface: PG.FB” option is to tell PhoneGap to use the native authentication interface instead of the mobile web interface. If you don’t add in the “PG.FB” option, you’ll get redirected to Facebook’s mobile authentication instead. It took me a while to figure this out too, and it’s not well documented, but that’s what is going on.

    Two other things about the PhoneGap Facebook Plugin that are not up to date with the latest Facebook JavaScript SDK:

    1. When using FB.login() you should be using the “scope” parameter, but PhoneGap expects the deprecated “perms” parameter.
    2. When the authentication response from FB.login() you should be getting “response.authResponse”, but instead “response.session” is what is given back. This means you’ll have to pull out the OAuth Access token with “response.session.auth_token” instead of “response.authResponse.accessToken”.

    Hopefully they’ll get to updating the PhoneGap Facebook Plugin, but for now I use if/else statements to detect if PhoneGap is there. You can check if PhoneGap is initialized by using:

    if(window.PhoneGap) {
      //PhoneGap Library is Loaded
    }

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've been trying to optimize a numeric program of mine, and have run into
I have been trying to determine a best case solution for registering a COM
I have been trying to run configure to prepare the make file for GTK
Over the past few days I have been trying to create/run a project in
I have been trying to get a simple spider to run with scrapy, but
I have been receiving errors when trying to save and run this Python 3.1
I just started working on Python and have been trying to run an outside
I have been trying to find some documention on whether it's possible to run
I am trying run geotools on the web and have been googling around how
I have been trying to get ruby 1.8.6 to connect to a MS SQL

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.