1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Facebook の Graph API で自分の投稿を取得する (Node.js)

Last updated at Posted at 2018-02-19

こちらのプログラムを Node.js で書いてみました。
Python3 で Facebook の自分の投稿を取得する

get_posts.js
#! /usr/bin/node
/*
	get_posts.js

					Feb/19/2018
*/
// ----------------------------------------------------------------
console.error ("*** 開始 ***")
//
var Client = require('node-rest-client').Client
var client = new Client()

const url="https://graph.facebook.com/v2.12/me/posts"

const access_token="FG4EFFBgb938BAO2ouOc1235pjXC8YgsXZBYRnZB8nNvwZCP7dJDTXq7pRrZCVXDX4rmH9hvEZCUj8ZA2ihBlMKMoVWWwzaaRzI8tqA6zCAhgZB12idZCYxIxXNmC112GypCJlnsGdUgLLwAYp0PAQinfL3J123f6or2JYj65bt0QSp1umNabcfg"

url_target = url + "?access_token=" + access_token
//
client.get(url_target,function (data, response) {
	const json_str = data.toString('utf8')
	console.log (json_str)
	console.error ("*** 終了 ***")
})

// ----------------------------------------------------------------

API の仕様

1
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
1
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?