iOS API的Facebook API [英] Facebook API for IOS

查看:120
本文介绍了iOS API的Facebook API的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序中包含iOS API的Facebook API,以分享我的应用在Facebook上的链接。当我从我的应用程序中点击分享时,当我已经在我的设备上登录了Facebook时,它共享了该链接。如果不是,请求我登录。一旦我登录,窗口关闭,它没有共享该链接。我需要再次点击分享才能分享链接。我需要在登录后自动共享
请帮助我。

解决方案

如果您的应用不是登录后重新启动您的应用程序(从浏览器或用户安装了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)

这篇关于iOS API的Facebook API的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆