【问题标题】:Open graph actions suddenly not working properly打开图形操作突然无法正常工作
【发布时间】:2013-01-06 17:23:27
【问题描述】:

我有一个动作在今天早上之前运行良好,但现在它的行为不正常。

Facebook 没有捕捉到我在“index.jsp?”之后发送的变量。因此,尽管发布了动作,但它显示拼图 id 和时间显示为 null。

以下是我尝试过的代码都给了我同样的问题。

 FB.api('/me/mpuzzleapp:solve?mpuzzle='+encodeURIComponent('{mycompleteurl}/index.jsp?mid='+mid+'&timing='+timing+'&access_token='+accessToken),'post', 
      function(response) {                                                                                  
        if (!response || response.error) {
              //alert(response.error.message);
          }else{ 
              alert("Action posted successfully.")
          }
      });


 FB.api(
        '/me/mpuzzleapp:solve',
        'post',
        {
          mpuzzle: '{mycompleteurl}/index.jsp?mid='+mid+'&timing='+timing+'&access_token='+accessToken
        },
        function(response) {
          if (!response || response.error) {
              alert(response.error.message);
          }else{ 
              alert("Action posted successfully.")
          }
        }
      );

以前这可以正常工作,现在它无法使用我的 url 捕获参数。贴在我墙上的链接是这个。

https://apps.facebook.com/mpuzzleapp/index.jsp?fb_action_ids=10151927328076515&fb_action_types=mpuzzleapp%3Asolve&fb_source=timeline_og&action_object_map=%7B%2210151927328076515%22%3A401787199906324%7D&action_type_map=%7B%2210151927328076515%22%3A%22mpuzzleapp%3Asolve%22%7D&action_ref_map=%5B%5D

缺少mid和timing参数。

【问题讨论】:

    标签: facebook facebook-graph-api facebook-javascript-sdk facebook-opengraph


    【解决方案1】:

    我不得不更改我的 og:url 标签,它运行良好:

    旧:

     <meta property="fb:app_id" content="278272228942900" /> 
      <meta property="og:type"   content="mpuzzleapp:mpuzzle" /> 
      <meta property="og:url"    content="https://apps.facebook.com/mpuzzleapp/index.jsp" /> 
      <meta property="og:title"  content="MPuzzle 3" /> 
      <meta property="mpuzzleapp:to" content="friends" /> 
      <meta property="mpuzzleapp:timing" content="00:00:45" /> 
      <meta property="og:image"  content="https://www.vishweshshetty.com/Facebook/puzzlemsg/65/images/icon.jpg" />
    

    新:

      <meta property="fb:app_id" content="278272228942900" /> 
      <meta property="og:type"   content="mpuzzleapp:mpuzzle" /> 
      <meta property="og:url"    content="https://apps.facebook.com/mpuzzleapp/index.jsp?mid=3&timing=00:00:45"&tolist=friends&pathpic=https://www.vishweshshetty.com/Facebook/puzzlemsg/65/images/icon.jpg" /> 
      <meta property="og:title"  content="MPuzzle 3" /> 
      <meta property="mpuzzleapp:to" content="friends" /> 
      <meta property="mpuzzleapp:timing" content="00:00:45" /> 
      <meta property="og:image"  content="https://www.vishweshshetty.com/Facebook/puzzlemsg/65/images/icon.jpg" />
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-04-30
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多