Unity and Facebook - iOS won't post, android does - ios

having a bit of an issue that I haven't been able to find anywhere. I've created a game using Unity and the Facebook SDK for Unity. It works great in the editor, great when pushed to android....But when I try an iOS install, it won't post onto my timeline or anyone else's and invites don't work....But the android version does.
It brings up the dialog like it should, looks like it's about to invite/post, then just goes back to the game.
I'm using Unity 4.3.4, Facebook SDK for Unity 5.0.3 and Xcode 5.1.
Any help would be appreciated.
EDIT: Some additional news. Facebook SDK for Unity has a tutorial attached to it where they have a pre-built project called Friend Smash to show you how the SDK works. I just ran the completed project through Xcode and pushed it to my iPhone and have experienced the EXACT same issue. Invite appears to be sent (even appears on the screen saying "request sent") and it appears to post my score to Facebook, but again nothing appears on Facebook.

Looks like this was my stuff up.
Looks like my request wasn't being given a Post ID. In checking my code, I had written "actionlink", instead of "link" in the "onBragClicked" method which fouled up the process....Yet somehow didn't screw up my android build.
Anyway, thanks for viewing.

Related

Unity FB SDK on iOS: Problems with FB.Feed function

We started using Facebook's SDK in our game which was made with Unity.
We are trying to post "brag posts" when people win against their friends, and we use FB.Feed with the friend's ID in the "to" parameter.
In iOS devices running with an older FB app version, a small popup opens up inside the game - and it works perfectly well.
However on devices running the newest FB app version, when we call this function the FB app is opened, completely losing focus from our game, and an incorrect brag post is shown and attempts to post it on the user's wall (instead of on the friend's wall).
Anyone else had this problem and figured out how to fix it?
Thanks
I'll look into whether the feed dialog changed in newer version of the facebook app. In the meantime here's a workaround. In the exported xcode project, open FbUnityInterface.mm and go to line 46.
You should see the code
self.dialogMode = NativeDialogModes::FAST_APP_SWITCH_SHARE_DIALOG;
change that to
self.dialogMode = NativeDialogModes::WEBVIEW_DIALOG_MODE;
This will force the sdk to use webview dialogs instead of the one from the facebook app.

iOS Facebook SDK 3.0 Login not redirecting to origin app

I recently updated my ios app to facebook sdk 3.0.
I did everything like describes here:
https://developers.facebook.com/docs/howtos/login-with-facebook-using-ios-sdk/
When I hit the Login with Facebook button everything works fine. The FB app is coming up, asks me for permissions BUT -> it doesn't redirect to come back to my app. It just stays with the FB app.
With the old SDK everything worked fine. Is it that the new SDK is not working with iOS 5?
I don't even know how to debug this...
Thanks for any kind of help!
UPDATE
It has something to do with my URL Schemes. Seems like ios SDK 3 doesn't like characters in the id. My former Scheme entry was fb0000000new where as the 0 are replaced by the app id. When I change that to just fb0000000 it works.
Would be good to have a link in the documentation though!
just try this its worked out for me
http://www.icodeblog.com/2011/03/28/facebook-sdk-posting-to-user-news-feed/

Launching a Facebook page from an iPhone app via QR code

I'm trying to create a QR code that launches a Facebook page from the app, rather than the browser on both Android and iOS.
Creating the code with fb://page/<page id>, works perfectly on an Android.
This was also supposed to work with iOS's Facebook app, but I think since Facebook updated their app recently from a HTML5 version to a fully native iOS app, that functionality has stopped working. It indeed opens the Facebook app, but it does not go to the page.
Has anyone else seen this happen since the app was updated a few weeks ago? And what string would I have to use to create a working QR Code for iOS's Facebook app?
We finally figured it out. FB changed it to fb://profile/ instead of "pages". It works across both platforms.

Sorry the application you are using is misconfigured for Facebook integration. Please download the latest version of the application. - Xcode

I have followed the Facebook integration tutorial here http://www.mobisoftinfotech.com/blog/iphone/iphone-fbconnect-facebook-connect-tutorial/
And the Facebook window opens but hen it displays the error message - sorry the application you are using is mis... The odd thing is if I click for espanol in the Facebook window and then back to english it works just fine. I am very confused with this and don't understand the tutorial on Facebook.developers.com. Please help. Also would love to now if there were an easier way to implement Facebook.
Thanks
sorry, I got the same error, and dont really know what the solution is,but..
I used the ApiKey and the SecretKey of this application: (I downloaded the MyGradesTutorial sample project, and took the key's to my application and) it worked smooth!
what does it mean is that the problem is probably in Facebook application and not in mine (yours) code!
I still searching for the solution from Facebook app side...

Good example of how to build an iphone app that integrates with facebook

I have experience building iPhone applications, however I'm new to the facebook API for iOS. Does anyone know of a good example of an iOS app that will post to user's facebook wall? I'm trying to integrate this functionality into an existing app that I'm working on. Thanks!
Check out the following open-source project:
facebook-ios-sdk
It's an open-source library to let you post to Facebook from your own iOS app.
They have posted code for a sample ViewController here as well. Unfortunately this doesn't do an explicit wall update, but it does read the users' status and request them to log in. And underneath this you can retrieve the source for the entire demo application:
https://github.com/facebook/facebook-ios-sdk/blob/master/sample/DemoApp/Classes/DemoAppViewController.m#L79
https://github.com/facebook/facebook-ios-sdk/tree/master/sample/DemoApp
You can check our documentation for iOS SDK 3.0.8 here at
https://developers.facebook.com/ios/
Download the SDK package here at
https://github.com/downloads/facebook/facebook-ios-sdk/FacebookSDK-3.0.8.pkg
Then try the samples/ folder for the existing samples.
Specially you can look at Scrumptuous and Hackbook for latest examples.

Resources