Facebook Connect plugin with PhoneGap Build

  • 10
  • Question
  • Updated 6 years ago
  • Answered
Hi everyone!

For a few days i'm trying to get the Facebook Connect Plugin working on iOS. I followed every step from https://github.com/phonegap/phonegap-... and it seems not to work with the online PhoneGap Build tool.

When i directly run the app from Xcode on my iPhone 4 the Facebook Connect Plugin works! But when i try to build it with PhoneGap Build and install it on my iPhone by the QR code the Facebook Plugin does nothing and shows also no error message...

In my config.xml i use the following code:
<plugins>
<plugin name="com.phonegap.facebook.Connect" value="com.phonegap.facebook.ConnectPlugin" />
</plugins>

I use PhoneGap 2.9.0
Hope someone can help me with this :)
Photo of pietjevanpiet

pietjevanpiet

  • 13 Posts
  • 0 Reply Likes

Posted 7 years ago

  • 10
Photo of Amir

Amir

  • 8261 Posts
  • 263 Reply Likes
Read the following doc on how to incorporated FB Connect onto Build projects.
https://build.phonegap.com/docs/plugi...

There we a few samples app to play around. Give it a try.
https://github.com/phonegap-build/Fac...

Thanks
Photo of pietjevanpiet

pietjevanpiet

  • 13 Posts
  • 0 Reply Likes
I already tried that, but when uploading i get the following error from PhoneGap Build.

Malformed config.xml

<gap:plugin name="FacebookConnect">
<param name="APP_ID" value="123456" />
<param name="APP_NAME" value="ContosoMobile" />
</gap:plugin>
Photo of Brent Dunklau

Brent Dunklau

  • 25 Posts
  • 1 Reply Like
I've been trying to get the Scrumptious tutorial to work since Monday. No matter what I try, the FB object is not being created. I have verified this through the debug tool in pgbuild.

Has anyone successfully deployed the Scrumptious app to an actual iPhone?

Here's my repo if anyone want to take a look:

https://github.com/bdunklau/infinite-...

thanks
Photo of Brent Dunklau

Brent Dunklau

  • 25 Posts
  • 1 Reply Like
Has anyone verified that this plugin works on an actual iPhone and was built using Phonegap Build? What version of phonegap was used? I originally tried using 2.9.0 then moved to 2.5.0 because I saw some references in the plugin code to cordova-2.5.0.js.

Now to the Scrumptious tutorial and instructions...

Following the instructions from here:
https://build.phonegap.com/docs/plugi...

1. register your app and get the APP ID and the Display Name - got it
2. add the following < script > tags to your index.html page

< script src="cdv-plugin-fb-connect.js" > < /script >
< script src="facebook-js-sdk.js" >< /script >

Question: https://github.com/phonegap-build/Fac... uses underscores instead of dashes: facebook_js_sdk.js Is this a typo? The file here has dashes in its name https://github.com/phonegap-build/Fac...

3. Add the < gap:plugin > tag. Here's mine:

< gap:plugin name="FacebookConnect" >
< param name="APP_ID" value="470700906355954" / >
< param name="APP_NAME" value="Brent1" / >
< /gap:plugin >

Is 'FacebookConnect' correct? Is there a space between Facebook and Connect?

4. Put the APP ID inside your js code. The only js code I have is the deviceready event where I have my FB.init() call (but the FB object isn't being created).

Then I'm sent back to the plugin's readme for more info https://github.com/phonegap-build/Fac... But this page contains a section called "Adobe PhoneGap Build" which basically says go to the page you came from because it contains all the instructions you need if using PG Build.

Question: What is with the src folder? https://github.com/phonegap-build/Fac... Do I need to include this in my app? Do I need to push it to heroku? There really isn't any mention of what to do with the src

Question: What's up with the plugin.xml file? https://github.com/phonegap-build/Fac... Do I need this in my app?

Now let's go to the Scrumptious readme https://github.com/phonegap-build/Fac...

#8 says "You also will want to change the open graph action in each of these html files to your action (Replace any mention of cordova)". I see a bunch of food html files with this head tag:
< head prefix="og: http://ogp.me/ns# fb: http://ogp.me/ns/fb# cordova: http://ogp.me/ns/fb/cordova#" >

Are these the instances of 'cordova' I'm supposed to replace? What do I replace them with? The Display Name or the namespace name?

I'm think I'm clear on all the other pieces of the Scrumptious readme. I should now be able to run the app from a device or simulator.

But I can't - same problem as before. 'deviceready' function starts but does not complete because the FB object is not found.
Photo of Gary Milholland

Gary Milholland

  • 15 Posts
  • 0 Reply Likes
I've been trying for a few weeks to get the Facebook Connect plugin to work with Android, and have been unsuccessful. I'm going to repost about it and see if I can get a resolution this time.
Photo of Sanjay Kamble

Sanjay Kamble

  • 2 Posts
  • 0 Reply Likes
Hi Gary ....For me also same problem it's working fine in simulator but niot working on device.........In device throwing an error cordova facebook plugin fail on init
Photo of Brent Dunklau

Brent Dunklau

  • 25 Posts
  • 1 Reply Like
Notice the Scrumptious demo site https://scrumpit.herokuapp.com/index....

View the source. Where are these script tags that I was told to put in my index.html ?
< script src="cdv-plugin-fb-connect.js" > < /script >
< script src="facebook-js-sdk.js" >< /script >

There's also js code at the bottom that loads the fb sdk asynchronously. Is the plugin supposed to inject this code into my page when pg builds my app?

What's going on?
Photo of Gary Milholland

Gary Milholland

  • 15 Posts
  • 0 Reply Likes
The script tags are only used so that PhoneGap Build can insert those files into your app before building, and which version (Android, iOS, etc) of the file they load will vary depending on which app they are building.

In terms of the code at the bottom that loads the fb sdk asynchronously, I don't know. I know you need to load that code in your web app to make it work online, both on your own site and on Facebook. If the plugin is actually loading the FB SDK a second time, the redundancy may be what's causing my error. I will try removing the code that loads the sdk, or possibly just remove the script tag, and see what happens with my next build. If it works, I'll let you know.
Photo of Tuomas Laatikainen

Tuomas Laatikainen

  • 3 Posts
  • 0 Reply Likes
I have Phonegap 2.9 and Facebook SDK 3.5.3. I configured Facebook plugin to APPNAME-info.plist file with following lines:


<key>FacebookDisplayName</key>
<string>APP_NAME</string>
<key>FacebookAppID</key>
<string>393939393939393939</string>
<key>CFBundleURLTypes</key>
<array>
<dict>
<key>CFBundleURLName</key>
<string>APP_NAME</string>
<key>CFBundleURLSchemes</key>
<array>
<string>fb393939393939393939</string>
</array>
</dict>
</array>


In config.xml I have following lines:


<plugins>
<plugin name="org.apache.cordova.facebook.Connect" value="FacebookConnectPlugin" />
</plugins>


I noticed also that "facebook_js_sdk.js" has changed to "facebook.js-sdk.js". Even the FacebookConnect samples doesn't use the new reference yet. So if you are upgrading from older version this must be changed.

I got my project running with these settings, but FB.init() doesn't finish. It won't give any error messages either. But when when I run FB.login() it says that you have run FB.init() first.
Photo of pietjevanpiet

pietjevanpiet

  • 13 Posts
  • 0 Reply Likes
Yes i use facebook-js-sdk.js and when i test it directly from Xcode on my iPhone 4 it works. But when i first build it with PhoneGap Build and than deploy it on my iPhone 4 it does nothing! :(
Photo of Brent Dunklau

Brent Dunklau

  • 25 Posts
  • 1 Reply Like
So there's the Facebook SDK for iOS, and on the getting started page https://developers.facebook.com/docs/... the first thing it says is "you need xcode". Soooooo I need a mac?

Doesn't this blow a giant gaping hole in phonegap's value proposition?
Photo of Brent Dunklau

Brent Dunklau

  • 25 Posts
  • 1 Reply Like
Tuomas - are you using the Phonegap Build service to build your app? Are you on a windows machine? mac? linux?
Photo of Gary Milholland

Gary Milholland

  • 15 Posts
  • 0 Reply Likes
And, the whole idea behind using PhoneGap Build is to avoid using multiple development environments (I'm using it because my laptop really isn't powerful enough to run Eclipse and an Android Emulator, and even if it were, I like not having to learn native Android and iOS languages). You're just supposed to be able to build your app using solely JavaScript, CSS, HTML and a config file (the config file isn't strictly necessary if you aren't using plugins). Regular PhoneGap is a different story.
Photo of pietjevanpiet

pietjevanpiet

  • 13 Posts
  • 0 Reply Likes
@Brent, i use PhoneGap Build tool. But that does'nt work, when i install the app on my iPhone 4 the FB.Login does nothing... When i deploy it from Xcode to my iPhone 4 it works! It looks like there is something going wrong on PhoneGap Build....
Photo of pietjevanpiet

pietjevanpiet

  • 13 Posts
  • 0 Reply Likes
PhoneGap help us please :(
Photo of Brent Dunklau

Brent Dunklau

  • 25 Posts
  • 1 Reply Like
Do I need the Facebook SDK for iOS if I want to deploy to iPhone? Or does Phonegap Build include that/make it available to my app?

If I do in fact need the Facebook SDK for iOS, sounds like I also need to install Xcode.

And if need Xcode, I need either a mac or I have to install VirtualBox on my pc and create an OS X virtual machine.

Anybody?
Photo of Gary Milholland

Gary Milholland

  • 15 Posts
  • 0 Reply Likes
If you're using PhoneGap Build, all you need is HTML5 and the config file, which means you do not need the Facebook SDK for iOs, just the Facebook SDK for Javascript. I think they are having issues with the plugin as I have noticed quite a few posts about this recently. For me, it works so far as to allow someone to login to Facebook from my app, but there must be a config issue somewhere because it won't actually login to my app that way, which means the app currently has no social integration.

You do, however, need access to a Mac and an iOs supported device (iPhone, iPad, iPod touch) to get the app onto the iPhone market. I haven't done this yet, as I don't have a Mac or an apple device, but as far as I can tell from reading their documentation you only need the Mac to generate the equivalent of the keystore you created for the Droid market.
Photo of Joshua Morony

Joshua Morony

  • 37 Posts
  • 0 Reply Likes
Can anyone confirm that the Facebook Connect plugin for build still works? The app I have on the app store is still able to log in with Facebook, but any new builds via PhoneGap Build don't work so I'm assuming it's a change / issue with PG Build.

Is the problem that a different configuration / set up is needed now for it to work, or is the plugin broken on PG Build?
Photo of pietjevanpiet

pietjevanpiet

  • 13 Posts
  • 0 Reply Likes
I finally got it working!

Use the following in your config.xml:
<gap:plugin name="com.phonegap.plugins.facebookconnect">
<param name="APP_ID" value="1234567890" />
<param name="APP_NAME" value="CoolApp" />
</gap:plugin>

And don't forget to add the XML sheme to the widget tag in config.xml:
xmlns:gap = "http://phonegap.com/ns/1.0"
Photo of beshoo

beshoo

  • 0 Posts
  • 0 Reply Likes
please kindly may you tell me the instruction that you made in facebook.com dev section ?

please how to get

ackage Name:
Class Name:
Key Hashes

for "PGB"

as For PhoneGap build it was quite harder. Because of lack of knowledge and confusing documentation

i can generate an APK from PGB but when i want to connect / Login to facebook using this example:
https://github.com/phonegap-build/Fac...

when i click on the Login : i get the an error the the login URL is is incorrect .

Now what i have to set in the facebook app center ?

Site URL: ? i did test : http://localhost/android_asset/www/
but not working ! please advice step by step
Photo of Nishank Singla

Nishank Singla

  • 15 Posts
  • 0 Reply Likes
i have same problem....i want to same settings for facebook app
please help
Photo of Amir

Amir

  • 8261 Posts
  • 263 Reply Likes
Hello everyone.

There were a slight changes on how plugins being incorporated onto Build's apps. Please read the announcement below:

http://phonegap.com/blog/2013/07/15/u...

We apologize for such a short notice.

Thanks
Photo of Brent Dunklau

Brent Dunklau

  • 25 Posts
  • 1 Reply Like
Works!

For anyone interested, here is my github repo for you to poke through: https://github.com/bdunklau/infinite-...
Photo of Brent Dunklau

Brent Dunklau

  • 25 Posts
  • 1 Reply Like
At the top of index-Simple.html is a div tag that shows a "loading..." message. I used that tag to display the contents of the 'response' object that I get back from FB.

I said: document.getElementById('data').innerHTML = JSON.stringify(response);

Looks like there is no response.session object. Here's what the response looks like as JSON: {status:connected, authResponse:{session_key:true, accessToken:CAAGsGZ.... }}

still working on this
Photo of Gary Weiss

Gary Weiss

  • 13 Posts
  • 0 Reply Likes
By the way, did you generate an android key, and a Facebook hashtag? Also- it wasn't clear to me what should be the "package name" and the "class name" that must be filled out on the Facebook app settings (under android native app)

At first I thought these weren't necessary, however after checking into the plugin's github page, it slowly dawned on me that phonegap-build is building a native android app.
Photo of Brent Dunklau

Brent Dunklau

  • 25 Posts
  • 1 Reply Like
I was actually having trouble with the first login. Looks like index-Simple.html is wrong when it checks response.session to see if I'm logged in. I changed my code to look at response.authResponse because that's what they have here: https://developers.facebook.com/docs/...

testing now...
Photo of Gary Weiss

Gary Weiss

  • 13 Posts
  • 0 Reply Likes
After I generated the Android Key, and the Facebook hashtag, things started to work properly. The thing to remember is that from facebook's point of view - you are actually creating a native Android app.
Photo of Brent Dunklau

Brent Dunklau

  • 25 Posts
  • 1 Reply Like
I still haven't messed with the Android side of things
Photo of beshoo

beshoo

  • 0 Posts
  • 0 Reply Likes
please any one may explain step by step how to get

ackage Name:
Class Name:
Key Hashes

for "PGB"

as For PhoneGap build it was quite harder. Because of lack of knowledge and confusing documentation

i can generate an APK from PGB but when i want to connect / Login to facebook using this example:
https://github.com/phonegap-build/Fac...

when i click on the Login : i get the an error the the login URL is is incorrect .

Now what i have to set in the facebook app center ?

Site URL: ? i did test : http://localhost/android_asset/www/
but not working ! please advice step by step
Photo of Gary Milholland

Gary Milholland

  • 15 Posts
  • 0 Reply Likes
Your package name is your game's unique id on Google Play (for Android), usually in the format of com.website.game. You decide what this id is, but it has to be unique. Class name isn't necessary for the Facebook Plugin as it uses single sign on, not deep linking, so click on "disable deep linking" and you won't have to worry about it.

Key hashes are command prompt, which from Windows 8, you click on the Windows button and X at the same time and choose "Command Prompt (Admin)". You'll need to download OpenSSL. Full details are here: http://stackoverflow.com/questions/75...
Photo of beshoo

beshoo

  • 0 Posts
  • 0 Reply Likes
The problem is when facebook app ask for my password

The error message appear :

Given URL is not permitted by the application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.
Photo of Angie

Angie

  • 3 Posts
  • 0 Reply Likes
I'm having the same issue as you guys. The Facebook login works fine for iOS, but not for my Android deployment. Using Phonegap Build 3.1. I get the same error:

Given URL is not allowed by the Application configuration.: One or more of the given URLs is not allowed by the App's settings. It must match the Website URL or Canvas URL, or the domain must be a subdomain of one of the App's domains.

I am testing on a DEVICE, not on a simulator, so I'm not sure why it is looking for a url. I did however get an error once (can't recall from what) that included the path “file:///android_asset/www/index.html.” Even tried setting my Facebook urls to that - which was immediately rejected.

Here is my plugin code:




Any ideas out there?
Photo of Angie

Angie

  • 3 Posts
  • 0 Reply Likes
Ugh, I hate how code gets removed. It's the most recent (as of Dec 2013) plugin format.

gap:plugin name="com.phonegap.plugins.facebookconnect"
Photo of Gary Weiss

Gary Weiss

  • 13 Posts
  • 0 Reply Likes
I wasted a LOT of time on this, Brent Dunklau's git url works.

but really, the documentation for the phonegap-facebook-plugin
needs to be rewritten....

The Phonegap Build section in the README should include a complete
list of step-by-step instructions

now I just need to figure out how to integrate this with parse.com's facebook utilities.
Photo of Red2678

Red2678

  • 255 Posts
  • 0 Reply Likes
So I am using Parse now :) Love it! Did you get this working with it?
Photo of Epics Epics

Epics Epics

  • 1 Post
  • 0 Reply Likes
Hi, I'm also struggling to implement the facebook connect. There is little information about the facebook side settings.
I used:

Package Name: id from config.xml widget
Class Name: com.phonegap.plugins.facebookconnect
Key Hashes generated using keytool

Is that right? Is the App Domain need to be something in particular?

Thanks for your help.
Photo of Amir

Amir

  • 8261 Posts
  • 263 Reply Likes
Hi Epics

The key hash required only if you have finalize and ready to publish. During development phase, it doesn't needed.

Please take a look at the following example app:
https://github.com/amirudin/pgb-fbcon...

Note: Please change an appropriate value for config.xml [Line: 16 & 17] and index.html [Line: 149]

Thanks
Photo of Draka N

Draka N

  • 1 Post
  • 0 Reply Likes
Seems to work great! tnx
Photo of Gary Weiss

Gary Weiss

  • 13 Posts
  • 0 Reply Likes
Recently this stopped working for me... (after I implemented log-out)

when FB.login() is called, I can see it opening a browser window.

However, almost immediately, the window switches back to the phonegap application, and I get an alert:
"Cordova Facebook Connect plugin fail on login! Facebook error: Failed to receive access token."

Does anyone have a suggestion on how to debug such a problem? I believe
FB.login() was able to open a separate window, but some problem was encountered there. Would inappbrowser approach give me more info?
Photo of Amir

Amir

  • 8261 Posts
  • 263 Reply Likes
Hi Gary

This might not help you a lot, but I found several post mentioning FB Logout issue at framework community below:
https://groups.google.com/forum/?from...

While I'm trying to look at the above, can you try post the same at the framework forum?

Thanks
Photo of Fred Mériot

Fred Mériot

  • 25 Posts
  • 1 Reply Like
Hello,

I have some problem with the plugin too. I followed the sample code of amir but I can't succeed in running it.

here is a video of my problem :
https://www.dropbox.com/s/79ok2dv5r85...

The first time login is working good, but the second failed. Any idea?

When I read your post, some of you say that the key hash is required only for the "release" version. Ok, but facebook needs a Hash Key in the "Android native application" configuration box. The PGB app refuse to log if this hash key is not configured. What do you do with that?

Thank you for your help
Photo of Amir

Amir

  • 8261 Posts
  • 263 Reply Likes
Hi Fred

I might miss something over there. Can you elaborate more about this:
"The PGB app refuse to log if this hash key is not configured.."

I'll investigate right after receiving your feedback.

Thanks
Photo of Fred Mériot

Fred Mériot

  • 25 Posts
  • 1 Reply Like
Hello, Thank you for coming back to me :) In fact it works without Hash key (I created a new fb app from scratch and I did'nt check the "native androïd app" section, so no need to have a Hashkey) but I still have the login + logout + login problem I showed in the video (dropbox link).

I took your github projet (https://github.com/amirudin/pgb-fbcon...), followed the 4 steps but it's still not working for me (almost). I reported the issue in the github projet.

Thank you for your help, this bug is really paralizing for us.
Photo of Fred Mériot

Fred Mériot

  • 25 Posts
  • 1 Reply Like
Hello,
Any new info about this problem?
Photo of Chandra Kantha

Chandra Kantha

  • 2 Posts
  • 0 Reply Likes
Here is the fix for this problem.!!!

Please go through this link : https://github.com/amirudin/build/wik...

Then create a new hash key using the keystore file that you generated and then update that hash key in your facebook app..!! Thats it..!!!
Photo of Roberto Brogi

Roberto Brogi

  • 4 Posts
  • 0 Reply Likes
hi all!

i have more problems with facebook plugin with phonegap 3.0 :(

have 23 errors:

example:

ctPlugin.java:190: error: cannot find symbol
[javac] super.onActivityResult(requestCode, resultCode, data);
[javac] ^
[javac] symbol: variable super
[javac] location: class ConnectPlugin
[javac] C:\starbytes\platforms\android\src\org\apache\cordova\facebook\Conne
ctPlugin.java:188: error: method does not override or implement a method from a
supertype
[javac] @Override
[javac] ^
[javac] C:\starbytes\platforms\android\src\org\apache\cordova\facebook\Conne
ctPlugin.java:236: error: cannot find symbol

I modified the file ConnectPlugin.java:
import org.apache.cordova.*;
and
import com.facebook.android.*;

many thanks
Photo of Jean Retombe

Jean Retombe

  • 1 Post
  • 0 Reply Likes
Hello Roberto, i have the same problem as you... Have you solved this problem? Thank you!
Photo of Matthijs Openneer

Matthijs Openneer

  • 1 Post
  • 0 Reply Likes
Does anyone have a working 3.0.0 version? If so, could you give me your plist additive. I think i'm going wrong there.
Photo of Amir

Amir

  • 8261 Posts
  • 263 Reply Likes
@Matthijs @Roberto

This topic are means for FB Plugin for PhoneGap Build service. For framework related stuff, kindly forward your inquiry at our framework community forum.

Here are some post related to yours:
https://groups.google.com/forum/?from...

Hope that helps

Thanks.
Photo of Sanjay Kamble

Sanjay Kamble

  • 2 Posts
  • 0 Reply Likes
Hi Amir, I am trying to integrate facebook login in android apps using phonegap 2.9.0.It's working perfectly in simulator.But when i tried on device it's throwing as error cordova facebook connect plugin fail on init.
I am following these methods

http://www.mobiledevelopersolutions.c...

Please help me Amir
Photo of Jane Wu

Jane Wu

  • 2 Posts
  • 0 Reply Likes
i have same issue...

"invalid android_key parameter. Your key "XXX" does not match the any allowed keys. Configure in your app key hashes at http://developers.facebook.com/apps/ "
Photo of Amir

Amir

  • 8261 Posts
  • 263 Reply Likes
Hi Jane

Do you still have the above issue? Are you referring to the following example?
https://github.com/amirudin/pgb-fbcon...

Thanks
Photo of Jane Wu

Jane Wu

  • 2 Posts
  • 0 Reply Likes
Hi Amir,
Yes, I still have the above issue and referring to the example.
I am using phonegap 2.9.0. and it's still not working.
Thank you for your reply.
Photo of Phone Gapps

Phone Gapps

  • 57 Posts
  • 0 Reply Likes
@Amir,

I just tried your code from https://github.com/amirudin/pgb-fbcon.... I downloaded index.html and config.xml, changed the AppID & AppName in the xml, the AppID in the html, zipped the 2 files and send the zip to Phonegap Build (2.9.0).

On Android (2.3.6 and 4.1.1) I get 2 alerts: "Cordova Facebook Connect plugin fail on init!" followed by "Cordova Facebook Connect plugin fail on auth.status!".
On iPhone 3GS no alert is shown but it doesn't work either.
(NOTE I'm not counting the alert shown on Android and iOS about updating the AppID)
Photo of Fred Mériot

Fred Mériot

  • 25 Posts
  • 1 Reply Like
It's interesting because I have the problem even if I create an Hash key. Do you have the procedure you use to create an Hash Key? Perhaps something fail with mine ...
Photo of Gary Weiss

Gary Weiss

  • 13 Posts
  • 0 Reply Likes
I used the standard procedure.
The way I usually debug these problems is to start with a working implementation, like Brent Dunklau's above, confirm it, then gradually add my code into it until I discover what breaks the working implementation. It's a slow process but it has proven itself...
Photo of Phone Gapps

Phone Gapps

  • 57 Posts
  • 0 Reply Likes
@Fred: actuallly it's now working fine, and I feel like I didn't change anything...
I would say either there was some issues with Hydration and/or it took quite some time for the facebook app to be usable (as I just created it for my tests).
Photo of Fred Mériot

Fred Mériot

  • 25 Posts
  • 1 Reply Like
ok ... I did'nt use Hydration, but I'll probably retry to build a new "pgb-fbconnect" app. Did you use an Hash key for the facebook app or not ?
Photo of Fred Mériot

Fred Mériot

  • 25 Posts
  • 1 Reply Like
see bellow ...
Photo of Fred Mériot

Fred Mériot

  • 25 Posts
  • 1 Reply Like
Hello, I try to strat from scratch again, but with no success. Here the procedure I used :

1 - I download the test project : https://github.com/amirudin/pgb-fbcon...
2 - I create a new facebook app.
3 - I modified my config.xml and the index.html with my APP_ID and APP_NAME
4 - I zip the whole thing and upload it to build.phonegap.

5 - I install it on my phone, log myself (it works)
6 - I logout and login again and I have a facebook error message : You did not have configure an hash key for your facebook app

7- I create an hash key like this
7.1 - keytool -exportcert -alias androiddebugkey -keystore debug.keystore > debug.txt
7.2 - openssl.exe sha1 -binary debug.txt > debug_sha.txt
7.3 - openssl base64 -in debug_sha.txt > debug_base64.txt
7.4 - I copy the Hash from the debug_base64.txt file into the HashKey field of my facebook app and save
8 - I select my debug.keystore file and add it to phonegap build keys of my project
9 - rebuild and reinstall

10 - I logout and login again and I have a facebook error message : Invalid android_key parameter. The key xxxxxxxxx does not match any allowed key. Configure you app key hashes at http://developer ....

So, nothing changed for me.

But is anobody sees a mistake in my procedure ? (the hash key generation?)

Thank you.

Photo of Gary Weiss

Gary Weiss

  • 13 Posts
  • 0 Reply Likes
Maybe the problem is that you are doing it in French? (mais non - je rigole !)

First, I suggest you start with a different working solution, Brent Dunklau's above (https://github.com/bdunklau/infinite-...), that's the one I use.

Second, what are your exact settings in "Native Android App" in facebook?

Third, the key seems like it's short, mine is 28 characters, maybe you missed a character?
Photo of Chandra Kantha

Chandra Kantha

  • 2 Posts
  • 0 Reply Likes
Here is the fix for this problem.!!!

Please go through this link : https://github.com/amirudin/build/wik...

Then create a new hash key using the keystore file that you generated and then update that hash key in your facebook app..!! Thats it..!!!
Photo of Fred Mériot

Fred Mériot

  • 25 Posts
  • 1 Reply Like
Ok I will check my hash key.

Here my FB settings :
Photo of Fred Mériot

Fred Mériot

  • 25 Posts
  • 1 Reply Like
Same here. I even pasted the hash key of the error message into the hash key field of my FB app as phone gapp suggested, but I still get the error above.
Photo of ppnyc

ppnyc

  • 2 Posts
  • 0 Reply Likes
I'm also facing the same problem. Any answers? Any solutions?
Photo of Fred Mériot

Fred Mériot

  • 25 Posts
  • 1 Reply Like
No ... I created a dedicated topic here : http://community.phonegap.com/nitobi/...

In case of someone had the same problem and found a solution
Photo of ppnyc

ppnyc

  • 2 Posts
  • 0 Reply Likes
Is this happening to everybody or only a subset of users of the plugin?
Photo of Fred Mériot

Fred Mériot

  • 25 Posts
  • 1 Reply Like

This conversation is no longer open for comments or replies.