Facebookからページデータを取得するにはアクセストークンが必要です。 まず自分のFacebookアプリケーションのパラメータを持つURLの下に使用してアクセストークンを取得:
https://graph.facebook.com/oauth/access_token?type=client_cred&client_id={yourappid}&client_secret={yourappscret}
次にあなたがトークン
一般戻ってFacebookのグラフAPIを呼び出すことができます。https://graph.facebook.com/wikipedia?access_token={token}
投稿:https://graph.facebook.com/wikipedia/posts?access_token={token}
を
サンプルコードは次のとおりです。
class Program
{
static void Main(string[] args)
{
var client = new WebClient();
string oauthUrl = string.Format("https://graph.facebook.com/oauth/access_token?type=client_cred&client_id={0}&client_secret={1}", "appid", "appsecret");
string accessToken = client.DownloadString(oauthUrl).Split('=')[1];
string pageInfo = client.DownloadString(string.Format("https://graph.facebook.com/wikipedia?access_token={0} ", accessToken));
string pagePosts = client.DownloadString(string.Format("https://graph.facebook.com/wikipedia/posts?access_token={0} ", accessToken));
}
}
上記のことから、アクセストークンの取得方法がわかりました。 もう一度進んでみたいと思います。上記の手順は、ページの情報と投稿をプルするのに役立ちます。ソフトウェアから、私はユーザーがページ管理者として壁にある特定の投稿に返信/コメントして欲しいと思っています。これは私のアプリケーションが最終的に達成したいものです。 あなたの返信をよろしくお願いします。 – HishHash