【问题标题】:'publish actions' permission is not require for screenshot posting?屏幕截图发布不需要“发布操作”权限吗?
【发布时间】:2014-07-09 12:00:37
【问题描述】:

对不起。我英语说得不好。

我正在使用 UNITY3D 和 Facebook UNITY SDK 开发一个小游戏

我已向 facebook 团队提交了一条评论以获得 publish_actions 权限。

(我的游戏将屏幕截图发布到用户的时间线。)

我收到了这条结果消息。

“您的应用体验不需要请求的权限。”

我正在使用 Facebook SDK 示例代码来实现屏幕截图功能。 https://developers.facebook.com/docs/unity/reference/current/FB.API

private IEnumerator TakeScreenshot() 
{
    yield return new WaitForEndOfFrame();

    var width = Screen.width;
    var height = Screen.height;
    var tex = new Texture2D(width, height, TextureFormat.RGB24, false);
    // Read screen contents into the texture
    tex.ReadPixels(new Rect(0, 0, width, height), 0, 0);
    tex.Apply();
    byte[] screenshot = tex.EncodeToPNG();

    var wwwForm = new WWWForm();
    wwwForm.AddBinaryData("image", screenshot, "InteractiveConsole.png");

    FB.API("me/photos", Facebook.HttpMethod.POST, Callback, wwwForm);
}

“屏幕截图按钮”被按下,对话框不出现。 当我未经许可尝试截图功能时,此功能不起作用

怎么了?

【问题讨论】:

  • "您的应用体验不需要请求的权限。"
  • 不需要对话。我向 facebook 开发组询问了这个问题,我得到了这个答案。 “嘿!您如何使用发布操作?您使用的是共享对话框还是其他插件?如果是,则不需要发布操作。”

标签: facebook permissions unity3d review


【解决方案1】:

文档位于

https://developers.facebook.com/docs/graph-api/reference/v2.0/user/photos/#pubperms

明确声明您需要publish_actions 权限才能为用户上传照片。

【讨论】:

    猜你喜欢
    • 2021-08-31
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-02
    • 2017-05-09
    • 2022-11-10
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多