I'm new to iOS and trying to integrate FB in my iOS application. I'm following instructions from this link.
Now the problem is that when I click the login button my app is not called back after login; instead it shows a dialog box saying:
Safari cannot open the page because the address is invalid.
What am I missing?
I struggled with the same issue for quite a while until I found out I had mistyped a key in the application plist (it's "URL Schemes" not "URL schemes"), see the top answer and comments here: Facebook iOS Safari "Cannot Open Page Error" When Authenticating User with Single-Sign-On.
Related
The situation:
1) I created a post in Facebook to this page: http://calendar.dondley.com/official-westfieldma-facebook-pages/
2) The page contains a list of links back to Facebook pages, formatted like this: https://www.facebook.com/1519027881736551
The problem:
1) A user taps on the link to the webpage using the Facebook app on their iPhone
2) The Facebook app opens the web page in the Facebook browser.
3) User taps on one of the links that takes them back to Facebook.
4) User sees this:
Additional info:
1) No problem on my Android Nexus 4 simulator and others have reported that it works OK on their Android. The problem only appears to happen with iPhone.
Any workaround or fix?
The fix is to not use https://www.facebook.com/{page_id} but https://www.facebook.com/{page_link}
So instead of https://www.facebook.com/1234878723423 use https://www.facebook.com/WhateverLinkToPageIsHere
I'm following the tutorial for Publishing using the Share Dialog on the Custom Stories in iOS section.
https://developers.facebook.com/docs/ios/open-graph
When I want it too, it switches to the Facebook App, the Graph Object is presented to the user (image, title etc) for a few seconds and then disappears and Post button greys out. If I tap the Post button before it greys out, I get an error message logged:
Error publishing story: Error Domain=com.facebook.Facebook.platform Code=102
"The operation couldn’t be completed. (com.facebook.Facebook.platform error 102.)"
UserInfo=0x16d48640 {error_code=102, app_id=1435110413425124,
error_message=An error occurred during publishing.}
FYI, the standard share dialogue presentShareDialogWithLink:handler: is working fine and letting me post - it's just when I present one with a Graph Object attached to it.
I would post sample code, but it'm using the same code that's in the tutorial above. Besides, I'm pretty sure this is to do with settings in the App Dashboard, not the code I'm writing.
Per this question on Stack Overflow Facebook SDK - iOS - Fail to share URL (Error 102), I've confirmed that:
My App's Settings are set correctly in App Dashboard (including iPhone Store ID and Bundle ID)
By info.plist file is configured correctly.
This question facebook error code 102 with sdk 3.6 suggested using a real Facebook user who was an administrator of the app. I tried that, but the problem still occurred for me.
I also tried it with the App published, and with it unpublished and there was no difference.
I'm wondering if anyone else has any ideas for things I haven't checked yet?
I'm a numpty.
Despite the fact I said I'd checked the settings were correct in App Dashboard, I had misspelt the Namepsace.
If your Facebook app status is "development and unavailable to the public" will caused same result.
You may want to change it to public under "App Review" on the Facebook app menu. Or you need to login Facebook as role "Administrators", "Developers" or "Testers"
I used the sessionloginsample from facebook SDK as baseline. I changed the app ID and managed to authorise my fb acc with my App Name. However once i click the top okay button, a pop up states " cannot open page " because address is invalid. Does anyone know about the solution?
This is because you have not changed app ID in plist file of your application. You should change your app id in plist too. Put your app ID where I have written YOURAPPID, and it will be working. Check image attached for more clarification.
Created a new App, created a new Fanpage for this App but if i click on "view my app profile page" it says that this page was not found. Other strange thing, if i click the link in the modal window where it says "The #NameOfMyApp Community page has been created and connected with this app." I´ll be redirected to my App Community page but there is no link where can add this app to my main Page. I´ve done this several times with several apps for the last few months, always the same way - worked like a charm. What´s wrong now?
This is temporarily "broken". Facebook has removed profile pages from new apps and replaced it with a add to page widget which is not yet available unless you manually install it somewhere. Very unintutive, but perhaps this will help: http://www.addtab.info/
I have created a facebook application that is used for posting a message to the wall. The application works fine. In the message I post there is a link. When I use the iphone facebook app and click this link instead of having Safari open immediately, the url opens in an internal frame of the facebook app and by click the small arrow it has the on the right bottom I can choose 'Open in safari'. This happenes only in iphone.
Is there a way to make my links open directly yo Safari?
Or is there a way yo get at least the facebook user-agent string so as to have a special treatment for this case?
Thanks in advance