Sending msg and post on own wall function no longer work

久未见 提交于 2019-12-24 00:44:43

问题


I created social feeds functions(sending msg to friends and posting on own wall) using javascript SDK and graph API in Facebook 2-3 months ago for my apps. It was working perfectly when I created but now, when I visit my app and try to use them again, it no longer works. It's so strange since I never touched that code after I implemented them. I even tried to copy and pasting exact sample javascript code given in Facebook document and it didn't work either. Even after I re-write my code, it still doesn't work either. I have no idea what is wrong. Anyone face similar problem with javascript SDK? Thanks in advance.

Hi,

The code is here: Sorry for late reply.

<script src='http://connect.facebook.net/en_US/all.js'></script>
      <script> 
      FB.init({
         appId  : 'id',
         status : true, // check login status
         cookie : true, // enable cookies to allow the server to access the session
         xfbml  : true  // parse XFBML
       });
      </script>
      <script>



        function share_wall() {
          // calling the API ...
          var obj = {
            method: 'feed',
            link: 'https://apps.facebook.com/id/',

            name: 'test',
            description: 'blalala'
          };
          FB.ui(obj);
        }   
    </script>

回答1:


I realized I actually have the same problem as you =\ Go to your app settings and make the additional configuration under Basic Settings.

If your domain is http://inspiration.nyp.edu.sg

If you are working on localhost

"Symptoms"

  • Previously, your JavaScript SDK functions were working fine. Now, executing your JavaScript SDK functions prompts you either an API Error Code 191 or an error.

  • Your PHP SDK functions are working fine.
  • Your JavaScript SDK functions work fine when you run your application as App on Facebook, but does not when you run your application as a Page Tab.

(For my case, the last date I checked was 7 August 2012 and my JavaScript SDK functions were working fine. It was until 3 September 2012 when I checked them again, then I encountered the errors mentioned above.)

I highly recommend everyone to check their Page Tab application's JavaScript SDK functions such as feed dialog, apprequests and etc.



来源:https://stackoverflow.com/questions/12027511/sending-msg-and-post-on-own-wall-function-no-longer-work

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!