簡體   English   中英

我如何自動在用戶牆上發布Facebook圖

[英]How can i automatically post on the user wall Facebook graph

嗨,當他連接時,我如何才能簡單地在用戶牆上發布一些內容?

我嘗試了這個:

      <div id="fb-root"></div>
        <script src="//connect.facebook.net/en_US/all.js"></script>
          <script  type="text/javascript"> 

            FB.init({
              appId      : '35455XXXX46207', // App ID
              status     : true, // check login status
              cookie     : true, // enable cookies to allow the server to access the session
              xfbml      : true  // parse XFBML
            });


var publish = {
  method: 'feed',
  message: 'getting educated about Facebook Connect',
  name: 'Connect',
  caption: 'The Facebook Connect JavaScript SDK',
  description: (
      'A small JavaScript library that allows you to harness ' +
      'the power of Facebook, bringing the user\'s identity, ' +
      'social graph and distribution power to your site.'
  ),
  link: 'http://www.fbrell.com/',
  picture: 'http://www.fbrell.com/f8.jpg',
  actions: [
    { name: 'fbrell', link: 'http://www.fbrell.com/' }
  ],
  user_message_prompt: 'Share your thoughts about RELL'
};

FB.ui(publish, Log.info.bind('feed callback'));
</script>

這會打開一個Facebook彈出窗口,但是我想直接用一​​些代碼來做..(就像spotify一樣)

有什么問題? (我已經得到了ext_perms)

謝謝

Spotify使用開放圖。

Joe Bloggs {action}在{app}上創建了一個{object}

因此Joe Bloggs在{'Spotify'}上{'聽了'}一個{'歌曲名稱和標題'}

您可以配置這些內容,並且在接受該應用程序時需要獲得這些權限。

在FB開發人員>應用程序>編輯應用程序>打開圖形中轉到您的應用程序。

這樣便可以做到。 至於自動共享,我不確定,我自己在尋找,但是懷疑它不可行。 想象一下虐待的能力。 但是聽起來開放式Graph可以滿足您的需求。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM