I cannot get both my own game using the SDK and the example Unity project provided by Facebook to work.
I have the Unity3D file uploaded and linked in the app settings. Upon clicking the "FB.Init" button, the console states: "Facebook DLL: Not loaded". Therefore, I am unable to login.
Pressing the button again provides this message: "FB.Init() has already been called. You only need to call this once and only once." If I force the login, I get this error: "NullReferenceException: Facebook object is not yet loaded. Did you call FB.Init()?"
This is also the same when testing on an iOS device.
Can anyone help?
I managed to solve my problem.
The host service that is storing my Unity build was being blocked by my browser script blocker. Though the game still ran fine, I was unable to use any of the Facebook SDK functionality with it blocked.
School boy error, but solved nonetheless.
Related
I have a FB app that my website uses for the FB Login button. This app has been public for some time, and works great in production. I created a test app for my dev environments, and this too has been working fine until last week, when I suddenly started seeing this message in the browser console:
Application Error: There was a problem getting data for the application you requested. The application may not be valid, or there may be a temporary glitch. Please try again later.
This happens after I call FB.init() -- a call to FB.getLoginStatus() triggers this error, and the callback passed to FB.getLoginStatus() is never invoked. Again, this only happens in my development environments, not production, although the XFBML button still triggers a popup.
I copied the basic SDK code from FB's documentation, placed it in its own page, and still have this problem, so it is not something on my website's pages that is interfering.
I've tried searching SO/Google for answers, but the only real information I get is from back in 2011/12/13 and involved FB apps being in development mode; mine is not, it is public. I've tried creating a new test app and changing the FB ID that my website uses, but I get the same result.
The only change to (all) of my environments made recently is that they're all using SSL by default. Could this possibly be the cause? And if so, why would it work in my production environment but not in my development environments? Any insight is much appreciated.
EDIT: Using SDK v2.4, if that matters.
EDIT 2: This only seems to happen if the user is not logged into FB at all. If they have logged in externally, the SDK seems to recognize that and the call to FB.getLoginStatus() works fine.
Looks like it's a Facebook bug: https://developers.facebook.com/bugs/252572561775079/
Check that your Facebook app is "live and available to all users" and not in development mode, otherwise you'll get this error.
Go to https://developers.facebook.com/apps/ > open your app > App Review > "Make [App Name] public?" > YES
I spent a while already to fix annoying issue with Facebook in PhoneGap app. And still a lot of things goes wrong with that. The thing is that I use Appery.io and Facebook plugin.
This is how my Facebook console looks now:
I suggest that localhost might be a reason of the issue. However, I got it into Facebook_Helper.js:
Everytime I try to sign in with FB account, I get the same error at the child window:
So what I've got is that app is authorized at this moment indeed, because there's a menu button at the navbar that allows me to navigate through FB profile:
The first issue lies in that the child window never gets closed automatically once user submitted Sign In form. And the second one is that I can't get the access token to the app directly. I know I'm doing something wrong, but I spend more than a week on that and nothing was clarified.
Honestly, I've no idea why it's not working. I saw a lot of apps written in PhoneGap that use the same authorization too, and they work as it should. Will be appreciate if you take a look into that and, maybe, advice something.
First, I don't see iOS or Android in your developer.facebook screenshot.
Second, you should implement native facebook integration if you are developing an app, if I understand correctly from your code, you are trying to handle only web browser version of authentication. Native integration is both the suggested way by facebook and platforms and better experience for end users. If users have facebook app installed, authenticating over fb app is more secure after all..
You can use a cordova plugin for facebook integration, here is one of the plugins (I am one of the authors): cordova-facebook plugin
I am using Unity Facebook SDK 5.1 and Unity version is 4.3.0.
I am testing on iPhone 4 device which don't have facebook app installed.
I have integrated SDK inside my game.
When i try to login into facebook using my app first it opens the FB login page inside browser,after login it ask me for authorization when i press "Ok" it takes me to my app.
Inside LoginCallBack method i got the following response
FBResult.Text =
{"is_logged_in":false,"user_id":"","access_token":"NOT_USED_ON_IOS_FACEBOOK","access_token_expires_at":"01/01/0001 00:00:00"} .
Many Thanks
Sachet
Make sure that your URLSchemeSuffix in your Info.plist is correct (fb[appid]) and that the handleOpenURL call (in your generated XCode project) is making it back to facebook.
I had the very same problem where another plugin was capturing the handleOpenURL call when i was returning from facebook after authorizing the app and it was preventing the handleOpenURL response from making it all the way back to the facebook plugin.
You can test it by putting a breakpoint in the Facebook/FbUnityInterface.mm file #
- (BOOL)openURL:(NSURL*)url sourceApplication:(NSString*)sourceApplication
If this isn't being hit, it's likely another openURL handler is getting the response first and not handing it back to super.
I got the same error but for different reasons using iOS native login.
I checked the URLScheme, add some breakpoints in the different OpenUrl but got nothing. Turns out I was logging with the "publish_actions" permissions. The message meant that this was not supported by iOS native implementation I suppose.
I regret the message not being helpful but you should pay attention to the requested permissions at login and ask them later using the graph API.
Hope that will help people having the same issue.
I got the same error. Reason was in incorrect bundle id (we used different bundle ids for release and development builds). Then we added this bundle id to Facebook App's Settings page, and the error gone.
I am using the facebook-iphone-sdk framework to integrate my iPhone app to FB. The problem is when I click the button it gives an error "The application you are using is misconfigured for the Facebook integration. Please download the latest version of the app."
I was able to connect with FB only once. For the first time it worked fine and I was also able to post some data into my wall but afterwords it not working, and the above error occurs.
What could I be doing wrong?
The Bundle ID is case sensitive so watch out for that.
e.g. com.myapp.MyApp is not the same as com.myapp.myapp
This happened to me and gave the same error message.
May be you are using the deprecated API of facebook... Please use the New FBGraph API for facebook integration ....
How to share or post by mail, twitter and facebook from the current application?
This is not only about email... here you will find the tutorial and sample code for facebook integration.....!!
Possible Solutions:
1) Double Check that you are putting in the right facebook app id in your code, and that you didnt somehow overwrite that when you made it work the first time.
2) Check that in the facebook developer profile you have all the proper things set up (They have decent doc's for how to set up properly).
3) Check that you are using the most up to date version of the SDK for fb.
4) Consider using the built-in Facebook for iOS6, since you probably wont be releasing your app before iOS 6 comes out anyways.
5) If all else fails, start over and go through the instructions from beginning to end. Check and re-check everything you set up and carefully scan for little typos or something. It's probably a minor mistake somewhere that you're overlooking.
6) Post code if you want more specific help. An error message isnt enough to deduce what your problem is.
Just delete you app from facebook dashboard, create it again, and then change the facebookID in you App-Info.plist, in the key FacebookAppId and URL types array key. I did it and my app works fine.
Delete facebook app, force perform login in safari..
I have an iPhone app that's using facebook connect via the ios-sdk to upload videos to facebook. It's been working fine until today. Most users are able to upload ok but one particular user gets this dialog first:
permissions ok
Once he hits ok he gets this dialog:
error dialog
I looked in the diagnostics for any errors and I didn't see any. The only thing I did notice was under feature requests it says "requests 1.0 - 30" for limit per user per day. I don't know if a particular user is running up against some limit or something else is going on.
The other interesting thing is that we have a full version and lite version. He can upload via the lite version but not the full version. Both versions use the same api calls for uploading videos.
update: User deleted the app from privacy settings in his facebook account. Then the app re-authorized and it all worked.
How did it get into this state? Is there a way to detect via the IOS app and resolve it?
Occasionally Facebook will return that error and most of the time (for me) there is nothing I can do to fix it except try again.
This error happens to me not only in this similar situation but also everywhere like Feed Dialog, Request Dialog, etc...
I'm pretty sure it's Facebook server error.