Search code examples
iosfacebookfacebook-ios-sdk

Integrating Facebook to post stuff from iPhone app


I'm trying to implement the functionality of sharing stuff on Facebook in my iPhone app. After walking through https://developers.facebook.com/docs/mobile/ios/build/ It's giving me some trouble!

I use a singleton class to contain the Facebook object. When I click the button to share something, the browser opens and I can login to fb. After that I can press 'okay' and it should redirect me to the app again. Sadly, I get an error message from safari: 'Safari cannot open the page because the address is invalid'

Obviously it's my first time trying to implement fb in an iOS app....

Does anyone have an idea?

Thanks ;-)


Solution

  • You need to register a URL Scheme for your application so it can be opened from browser/other applications (like Facebook's official one).

    This is described in Step 3: Implementing Single Sign-On (SSO) part of the tutorial you refer to (especially "Modify the app property list file" section).