Facebook - 获取有关共享帖子的信息

时间:2016-02-21 11:23:27

标签: facebook

我从我的小组收到所有帖子,我想在我的网站上发布。 当我从粉丝页面分享一些帖子时 - 我可以获得有关此帖子的所有信息:

import android.support.v7.app.ActionBarActivity;

public class MainActivity extends ActivityBarActivity {

      ActionBar mActionBar = getSupportActionBar();
      mActionBar.setDisplayOptions(ActionBar.DISPLAY_HOME_AS_UP | ActionBar.DISPLAY_SHOW_CUSTOM | ActionBar.DISPLAY_SHOW_HOME);
  }

这是这篇文章的屏幕:

enter image description here

问题是当我分享用户的帖子时。我无法获得有关这些帖子的任何信息:

array(2) {
  ["data"]=>
  array(11) {
    [0]=>
    array(13) {
      ["from"]=>
      array(2) {
        ["name"]=>
        string(20) "Franciszek Bonaparte"
        ["id"]=>
        string(15) "120501615004257"
      }
      ["name"]=>
      string(11) "Funny Vines"
      ["description"]=>
      string(25) "lol

Follow - Funny Vines"
      ["full_picture"]=>
      string(144) "https://scontent.xx.fbcdn.net/hvthumb-xpf1/v/t15.0-10/12378449_1685955568343914_1258612246_n.jpg?oh=2878b7077fd0b69ed69a6ab1f08119d3&oe=572809E9"
      ["picture"]=>
      string(153) "https://scontent.xx.fbcdn.net/hvthumb-xpf1/v/t15.0-10/p130x130/12378449_1685955568343914_1258612246_n.jpg?oh=43ce7f3fa54763e8dbe1fa91125a2fca&oe=57660849"
      ["story"]=>
      string(87) "Franciszek Bonaparte udostÄpniĹ film uĹźytkownika Funny Vines w grupie Testowa Grupa."
      ["source"]=>
      string(224) "https://video.xx.fbcdn.net/hvideo-xpl1/v/t42.1790-2/12744961_750810311722206_1464373469_n.mp4?efg=eyJybHIiOjg1NSwicmxhIjo1MTIsInZlbmNvZGVfdGFnIjoic3ZlX3NkIn0%3D&rl=855&vabr=475&oh=ccf857554a10954d543abd01b599e6b4&oe=56CC1335"
      ["created_time"]=>
      string(24) "2016-02-21T11:16:32+0000"
      ["message"]=>
      string(12) "test message"
      ["id"]=>
      string(33) "1150748191602267_1155126047831148"
      ["likes"]=>
      array(2) {
        ["data"]=>
        array(0) {
        }
        ["summary"]=>
        array(3) {
          ["total_count"]=>
          int(0)
          ["can_like"]=>
          bool(true)
          ["has_liked"]=>
          bool(false)
        }
      }
      ["comments"]=>
      array(2) {
        ["data"]=>
        array(0) {
        }
        ["summary"]=>
        array(3) {
          ["order"]=>
          string(13) "chronological"
          ["total_count"]=>
          int(0)
          ["can_comment"]=>
          bool(false)
        }
      }
      ["attachments"]=>
      array(1) {
        ["data"]=>
        array(1) {
          [0]=>
          array(4) {
            ["media"]=>
            array(1) {
              ["image"]=>
              array(3) {
                ["height"]=>
                int(640)
                ["src"]=>
                string(144) "https://scontent.xx.fbcdn.net/hvthumb-xpf1/v/t15.0-10/12378449_1685955568343914_1258612246_n.jpg?oh=2878b7077fd0b69ed69a6ab1f08119d3&oe=572809E9"
                ["width"]=>
                int(640)
              }
            }
            ["target"]=>
            array(2) {
              ["id"]=>
              string(16) "1271441132885072"
              ["url"]=>
              string(71) "https://www.facebook.com/funnyvinesofficalpage/videos/1271441132885072/"
            }
            ["type"]=>
            string(12) "video_inline"
            ["url"]=>
            string(71) "https://www.facebook.com/funnyvinesofficalpage/videos/1271441132885072/"
          }
        }
      }
    }

这是这篇文章的屏幕:

enter image description here

为什么我无法获得有关作者,共享post_id等的信息?这是我的代码:

array(2) {
  ["data"]=>
  array(12) {
    [0]=>
    array(6) {
      ["from"]=>
      array(2) {
        ["name"]=>
        string(20) "Franciszek Bonaparte"
        ["id"]=>
        string(15) "120501615004257"
      }
      ["created_time"]=>
      string(24) "2016-02-21T11:20:50+0000"
      ["message"]=>
      string(14) "test message 2"
      ["id"]=>
      string(33) "1150748191602267_1155127894497630"
      ["likes"]=>
      array(2) {
        ["data"]=>
        array(0) {
        }
        ["summary"]=>
        array(3) {
          ["total_count"]=>
          int(0)
          ["can_like"]=>
          bool(true)
          ["has_liked"]=>
          bool(false)
        }
      }
      ["comments"]=>
      array(2) {
        ["data"]=>
        array(0) {
        }
        ["summary"]=>
        array(3) {
          ["order"]=>
          string(13) "chronological"
          ["total_count"]=>
          int(0)
          ["can_comment"]=>
          bool(false)
        }
      }
    }

感谢您的帮助!

0 个答案:

没有答案