k13style Logok13style|Design Studio

  • Blog IconBlog
  • Generative IconGenerative
  • About me IconAbout me

facebook APIJul 07,2011

facebook APIを使う機会が出来たので情報まとめ

[仕様]

- 本家
Graph API

-日本語版
Graph API日本語版

認証が必要なAPIをたたくとき

var appId = "appIDを入れる";
if(window.location.hash.length == 0){
	url = "https://www.facebook.com/dialog/oauth?client_id=" +
	appId  + "&redirect_uri=" + window.location + "&response_type=token";
	window.location.href = url;
} else {
	accessToken = window.location.hash.substring(1);
	//Friendsを取得
	graphUrl = "https://graph.facebook.com/me/friends?" + accessToken + "&callback=コールバック名"

	//use JSON-P to call the graph
	var script = document.createElement("script");
	script.src = graphUrl;
	document.body.appendChild(script);
}

※ connectionについて調べる

« javascriptでリンクをさせないとき。
ハイパフォーマンスWebサイトまとめ »

Comment

Click here to cancel reply.

●Category

  • api (1)
  • Blog (14)
  • CSS3 (2)
  • Generative Art (2)
  • html5 (4)
  • ipad (1)
  • Javascript (8)
  • Proce55ing (1)
  • Project (5)
  • wordpress (4)
  • work (3)
  • XHTML (3)

●Monthly Archives

  • 2012
    1
  • 2011
    2 4 5 6 7
  • 2010
    1 2 3 4 5 7 8 9
  • 2009
    12

●Links

  • friends

    • HTML5 -Onono-
    • IAI RECORDINGS
    • mag -Web Magazine for Bass Music-
    • WEBで何か作るよ
    • ひろぽっぽれす
  • k13style Account

    • k13stumblr
  • Project

    • +rack you
    • clstr

twitterIconTwitter

If you can't wait - check out what I've been twittering

FlickrIconFlickr

Loading...

DeliciousIconDel.icio.us

  • FacebookページへのIFrameタブ追加方法が変更: 小粋空間
  • 続:Androidブラウザでviewportのwidth指定[to-R]
  • HTML5 Advent Calendar '11 - はてなまとめ(仮)
  • Web Audio API
  • はじめてのWebfonts | Design Spice

mailIconContact

k13style @ Gmail

©2006 - 2012  k13style