且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

iOS API的Facebook API

更新时间:2023-12-02 18:12:16

如果您的应用不是登录后重新启动您的应用程序(从浏览器或用户安装了Facebook应用程序),然后您没有将FB应用程序标识添加到您的Info.plist(这是您的应用程序的启动方式)



请参阅文档,转到部分修改应用程序属性列表文件


...创建一个名为URL的新行项目,URL方案,
包含单个值,fbYOUR_APP_ID(文字字符fb
后跟您的应用程序ID)。以下显示行
应如何在.plist文件中出现...


例如:



网址类型。[0] .URL计划。[0] .fb1234 (您的Facebook应用程序ID为1234)


I am including Facebook API for IOS in my app to share the link from my app in facebook. When I click "Share" from my app, It shares the link when I already logged in facebook in my device. If not it asks me to login. Once I logged in, the window closed and its not shared that link. i need to click "Share" again to share link. What should I need to share automatically after I logged in. Pls Help me.

If your app is not re-launching your app after sign-in (from browser or if the user has installed the Facebook app) then you have not added your FB App Id to your Info.plist (which is how your app gets launched)

See the documentation here go to section Modify the app property list file:

... Create a new row named URL types with a single item, URL Schemes, containing a single value, fbYOUR_APP_ID (the literal characters fb followed by your app ID). The following shows exactly how the row should appear in the .plist file...

Eg:

URL Types.[0].URL Schemes.[0].fb1234 (where your Facebook app id is 1234)