简体   繁体   English

iOS Facebook Like按钮无法与iOS App一起使用

[英]iOS Facebook Like Button Not Working With iOS App

Trying to add the Facebook Like Button to an iOS App. 尝试将Facebook Like Button添加到iOS应用。 Followed the directions online and am seeing an issue. 遵循网上指示,发现有问题。

Without the Facebook App Installed on Simulator (8.x, 7,x): 没有在Simulator(8.x,7,x)上安装Facebook应用程序的情况下:

When pressing the F Like button, we see a transition to Facebook.com but then quickly returns to the iOS App. 当按下F Like按钮时,我们看到过渡到Facebook.com,但随后迅速返回到iOS App。 It does not go to the proper Facebook Like page where the user can like the URL passed. 它不会转到正确的Facebook Like页面,用户无法在其中喜欢传递的URL。

In the iOS app, the openURL method is being called and the Facebook 在iOS应用中,调用openURL方法,然后在Facebook中

wasHandled = [FBAppCall handleOpenURL: url sourceApplication: sourceApplication];

is being called and it returns YES. 被调用,并且返回YES。

Please note that we are also using the Facebook Login Button that is working fine in this app. 请注意,我们还使用了在此应用程序中正常运行的Facebook登录按钮。

The user has already been authenticated with the Facebook Login Button at this point. 此时,用户已经通过Facebook登录按钮进行了身份验证。

Any hints on this would be appreciated. 任何提示对此将不胜感激。

We are using Facebook iOS SDK 3.21.1 我们正在使用Facebook iOS SDK 3.21.1

[Addition] [加成]

See this article 看这篇文章

http://stackoverflow.com/questions/26529314/android-likeview-error

This is what we are seeing in the the URL Error Message in openURL 这就是我们在openURL中的URL错误消息中看到的

The like dialog is only available to developers and testers

Which kinda does not make sense? 哪一种没有意义? Regular users should be able to see the like dialog to like the item? 普通用户应该能够看到“喜欢”对话框来喜欢该商品吗?

For Facebook Like Buttons on iOS and Android. 适用于iOS和Android上的Facebook Like Buttons。

After you have integrated the latest SDK and you want to test.... 集成最新的SDK之后,您想进行测试...。

1) You must use a Facebook Account that is either the Developer account for the app (the account that the Facebook ID for the app was created) OR a linked tester Facebook account to the Facebook Developer account. 1)您必须使用Facebook帐户,该帐户既可以是应用程序的开发人员帐户(创建应用程序的Facebook ID的帐户),也可以是链接到测试人员的Facebook帐户到Facebook开发人员帐户。

2) You have to use this account to login with on for the App. 2)您必须使用此帐户在App上使用on登录。

3) When testing a "BETA" banner will be on the target page. 3)测试时,“ BETA”标语将出现在目标页面上。

4) If these are not in place, for iOS at least you will get an error message in the URL in the openURL routine in the AppDelegate. 4)如果这些位置不正确,至少对于iOS,您会在AppDelegate的openURL例程的URL中收到一条错误消息。 For Android you will get a "CANCEL" status in your onActivityResult routine. 对于Android,您将在onActivityResult例程中获得“取消”状态。

The like dialog is only available to developers and testers

Hope this helps. 希望这可以帮助。

To fully enable the like button for production, please see Ming Li comments above. 要完全启用Like按钮进行生产,请参阅上面的Ming Li评论。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM