网站链接facebook 拿新的post

$http({
    method: "GET",
    url: "https://graph.facebook.com/oauth/access_token?client_id=xxx&client_secret=yyy&grant_type=client_credentials",
}).then(function (response) {
    var accessToken = response.data.access_token;
    $http({
        method: "GET",
        url: "https://graph.facebook.com/zzz/feed?" +
        "fields=attachments{subattachments},message,link,created_time,full_picture&limit=8&access_token=" + accessToken,
    }).then(function (response) {
        var dailyData = response.data.data.reduce(function (result, data) {
            if (data.full_picture) {
                result.push(data);
            }
            return result;
        }, []);
        $scope.facebookDailys = dailyData;
    })
})

  

只需要创建一个新的app, 链接: https://developers.facebook.com/apps/

填写表格后去facebook 专业

 

在about 的有pageID

就这样可以得到3个param。

posted @ 2017-05-26 20:24  泉油  阅读(778)  评论(0编辑  收藏  举报
Web Design Johor Bahru Malaysia - Stooges