通过Graph API更新Facebook应用程序设置 [英] Updating Facebook app settings via Graph API

查看:116
本文介绍了通过Graph API更新Facebook应用程序设置的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

使用Javascript SDK,通过Graph API更新应用设置有问题。我遵循了这些文件( https://developers.facebook.com/docs/graph- api / reference / app ),并尝试使用此代码:

I have a problem with updating app settings via Graph API using Javascript SDK. I followed the documentation (https://developers.facebook.com/docs/graph-api/reference/app) and tried this code:

FB.api(
    "/APP_ID/?access_token=APP_ID|APP_SECRET",
    "POST",
    {
        "object": {
            "canvas_url": "Test about text",
            "migrations": "{'secure_stream_urls': true}",
            "restrictions": "{'age': '21+', 'type': 'alcohol'}"
        }
    },
    function (response) {
      if (response && !response.error) {
        console.log(response);
      }
    }
);

响应是 true 但是我看不到Facebook开发人员的应用程序设置页面发生变化(无论我想要更改哪些属性)。

The response is true but I see no changes in the application settings page in Facebook Developers (no matter which properties I am trying to change).

任何人都可以帮助?

推荐答案

不要使用对象 -

FB.api(
   "/APP_ID/?access_token=APP_ID|APP_SECRET",
   "POST",
   {
      "canvas_url": "Test about text",
      "migrations": "{'secure_stream_urls': true}",
      "restrictions": "{'age': '21+', 'type': 'alcohol'}"
   },
   function (response) {
     //if (response && !response.error) {
       console.log(response);   // console the complete response for any errors
     //}
   }
);

这篇关于通过Graph API更新Facebook应用程序设置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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