iOS上的Unity FB SDK:FB.Feed功能的问题 [英] Unity FB SDK on iOS: Problems with FB.Feed function

查看:202
本文介绍了iOS上的Unity FB SDK:FB.Feed功能的问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们开始在我们的游戏中使用Facebook的SDK,这是由Unity制作的。



当人们赢得对方的朋友时,我们试图发布brag帖子,而我们在to参数中使用FB.Feed与朋友的ID。



在使用较旧的FB应用程序版本的iOS设备中,游戏中会弹出一个小型弹出窗口 - 并且它的工作效果非常好。



但是,在运行最新的FB应用程序版本的设备上,当我们调用此功能时,FB应用程序被打开,完全失去了我们的游戏焦点,显示不正确的brag帖子,并尝试将其发布在用户的墙上(而不是在朋友的墙上)。



任何人都有此问题,并找出如何修复



谢谢

解决方案

我会研究在新版本的Facebook应用程式中,Feed对话框已更改。在此期间,这是一个解决方法。在导出的xcode项目中,打开FbUnityInterface.mm并转到第46行。

您应该看到代码

  self.dialogMode = NativeDialogModes :: FAST_APP_SWITCH_SHARE_DIALOG; 

将其更改为

自己的对象

这将强制sdk使用webview对话框,而不是Facebook应用程序。 >

We started using Facebook's SDK in our game which was made with Unity.

We are trying to post "brag posts" when people win against their friends, and we use FB.Feed with the friend's ID in the "to" parameter.

In iOS devices running with an older FB app version, a small popup opens up inside the game - and it works perfectly well.

However on devices running the newest FB app version, when we call this function the FB app is opened, completely losing focus from our game, and an incorrect brag post is shown and attempts to post it on the user's wall (instead of on the friend's wall).

Anyone else had this problem and figured out how to fix it?

Thanks

解决方案

I'll look into whether the feed dialog changed in newer version of the facebook app. In the meantime here's a workaround. In the exported xcode project, open FbUnityInterface.mm and go to line 46.
You should see the code

self.dialogMode = NativeDialogModes::FAST_APP_SWITCH_SHARE_DIALOG;

change that to

self.dialogMode = NativeDialogModes::WEBVIEW_DIALOG_MODE;

This will force the sdk to use webview dialogs instead of the one from the facebook app.

这篇关于iOS上的Unity FB SDK:FB.Feed功能的问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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