打开图表操作突然无法正常工作

时间:2013-01-23 09:23:48

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

我有一个过去一直工作到今天早上的行动,但现在它的行为不应该如此。

Facebook没有捕捉我在“index.jsp?”之后发送的变量。因此,虽然动作已发布,但它显示为拼图ID和时间显示为空。

enter image description here

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

 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.")
          }
        }
      );

以前这曾经工作得很好,现在它只是无法用我的网址捕获参数。发布在我墙上的链接就是这个。

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参数。

1 个答案:

答案 0 :(得分:0)

我不得不改变我的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" />