私たちはFacebookのフォトホスティングを利用し、訪問者が私たちのファンページにアップロードされた私たちのウェブページから写真を見ることを可能にしています。外部のウェブサイト内のFacebookのファンページの写真にアクセスする方法
これを達成する方法を知っている人はいますか?
ありがとうございます! スティーブン。
私たちはFacebookのフォトホスティングを利用し、訪問者が私たちのファンページにアップロードされた私たちのウェブページから写真を見ることを可能にしています。外部のウェブサイト内のFacebookのファンページの写真にアクセスする方法
これを達成する方法を知っている人はいますか?
ありがとうございます! スティーブン。
あなたのFacebookページのアプリIDにアクセストークンがあるか、写真の権限が完全に公開されている場合、ソーシャルグラフを使用してこれを行うことができます。
ソーシャルグラフを使用すると、基本的にRESTのようなWebサービスを介して写真にアクセスできます。だから、最初のステップは、上記のようなURLを使ってアルバムを取得することです
https://graph.facebook.com/cocacola/albums
(コカ・コーラのファンページ用フォトアルバム)
:Webサービスの呼び出しがdataExampleのJSONオブジェクトを返します。 フォトアルバムをスキャンし、必要なアルバムのオブジェクトIDを取得します。
{
"id": "455377148305",
"from": {
"name": "Coca-Cola",
"category": "Company",
"id": "40796308305"
},
"name": "Coca-Cola Fanmeile FIFA WM 2010",
"link": "http://www.facebook.com/album.php?aid=249745&id=40796308305",
"count": 20,
"type": "normal",
"created_time": "2010-10-22T15:53:36+0000",
"updated_time": "2010-10-22T15:55:23+0000",
"comments": {}
},
オブジェクトIDを取得したら、グラフURLの最初のパラメータとして配置するだけでアクセスできます。例:そこから
https://graph.facebook.com/40796308305
、あなたが(パーミッションの設定に応じて)画像に実際のURLをつかむことができるはず
{
"id": "40796308305",
"name": "Coca-Cola",
"picture": "http://profile.ak.fbcdn.net/hprofile-ak-snc4/hs236.ash2/50516_40796308305_7651_s.jpg",
"link": "http://www.facebook.com/coca-cola",
"category": "Company",
"website": "http://www.coca-cola.com",
"username": "coca-cola",
"products": "Coca-Cola is the most popular and biggest-selling soft drink in history, as well as the best-known product in the world.\n\nCreated in Atlanta, Georgia, by Dr. John S. Pemberton, Coca-Cola was first offered as a fountain beverage by mixing Coca-Cola syrup with carbonated water. Coca-Cola was introduced in 1886, patented in 1887, registered as a trademark in 1893 and by 1895 it was being sold in every state and territory in the United States. In 1899, The Coca-Cola Company began franchised bottling operations in the United States.\n\nCoca-Cola might owe its origins to the United States, but its popularity has made it truly universal. Today, you can find Coca-Cola in virtually every part of the world.",
"likes": 22264613
}
これは素晴らしいです、私たちの訪問者はにコメントすることができます方法がありますコメントをFacebookにも表示されますか? – steven