Facebook integration in iphone OS 4.0 or later

拜拜、爱过 提交于 2019-12-12 12:31:07

问题


i am trying to integrate Facebook on my iphone OS 4.0. The problem comes when i try to display dialog box for login. the dialog box loads and then crashes immediately.The same code is working great in IOS 3.1. Please help. Thanx.


回答1:


I had a similar issue with my iPhone app. Most likely JavaScript is crashing your application.

I worked around this issue by accessing Facebook login site directly via URL: http://graph.facebook.com/oauth/authorize?client_id=YOUR_APP_ID&redirect_uri=http://YOUR_SITE_URL&scope=publish_stream,offline_access&type=user_agent&display=touch

If you open that link in your iPhone app, it'll display a login screen if user is not logged in, or ask for permission to Publish Stream & Offline Access (as directed in scope) and then it'll come back to YOUR_SITE_URL with access_token, which you can later use to communicate with Facebook via Graph API.




回答2:


There is a lot of issues related to app crashes, you might want to use the debugger and post the problematic codes for review.




回答3:


Make sure you are running the latest version of the Facebook SDK from Github. And please post the code that is crashing.



来源:https://stackoverflow.com/questions/5209205/facebook-integration-in-iphone-os-4-0-or-later

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!