May 4, 2010

facebook との連携

好試力研究所のHOME PAGE で facebook との連携 をしてみた。

----------------------------------------------------
1. Social plugin

Social plugin の「いいね!」をあちこちに入れてみた。
これは、簡単である。

http://developers.facebook.com/docs/reference/plugins/like
で、プラグイン用のjavascriptを取り出せるので、貼り付けるだけ。

----------------------------------------------------
2. Single sign in

Single sign in を入れてみた。
http://www.majin-z.com/
で、facebook のアカウントでログインできる。

試してみてもらいたい。

ログインの時点で、好試力研究所のHOME PAGE では、
facebook のユーザID番号と、ユーザ名を取り出せる。

メールアドレスを取り出すことも可能であるが、
ログイン時点に確認になる。

ログインしても、現状とくに何かおきるわけではない。

好試力研究所としては、facebookのアカウントでログインして
ショッピングまで連動したいのだが、、、
その方法の記載が不明だった。
ということで、広告を出すほうが効果的とおもわれた。

-------------------------------------------
組み込みの方法は、昨日のfacebook関係の翻訳を参考にしてもらいたい。
概要は、以下

(1)アプリケーションID作成をする
http://developers.facebook.com/setup/

秘密キーもできる
同時にサンプルコードも出てくるので
これを手本に、phpスクリプトへ組み込み。

シングル・サインイン・アプリケーションが
emailを取得したいとき、別の確認フォームが出てくる。
このとき、アプリケーションのアイコンを登録する場所が
facebook通常画面上部メニューの「アカウント/アプリケーション設定」となる。

php 関数 json_decode() が、 VPSサーバになく、
拡張モジュールをインストールしようとしても、 gcc をインストールできなくで
あきらめた。(自分で文字列ハンドリングする必要あり。)

May 2, 2010

Facebook for Mobile Apps の訳

http://developers.facebook.com/docs/guides/mobile/
Facebook for Mobile Apps の訳
EXCITE機械翻訳です。

ホーム :  Documentation :  Facebook for Mobile Apps
-----------------------------------------------------------------------
Introduction.
序論。

Over 100 million people use Facebook from mobile phones every month. You can incorporate Facebook into your own mobile application using the same APIs as those provided for all web sites, formatted to fit on a mobile phone.

1億人以上は、毎月携帯電話からFacebookを使用します。 あなたは、携帯電話で合うようにフォーマットされた、すべてのウェブサイトに提供されたものと同じAPIを使用することであなた自身のモバイルアプリケーションにFacebookを組み入れることができます。


This guide focuses on mobile web sites. If you are building a native mobile application, check out our open source mobile SDKs:

このガイドはモバイルウェブサイトに焦点を合わせます。 固有のモバイルアプリケーションを組立てているなら、私たちのオープンソースモバイルSDKsを調べてください:

iPhone SDK
Android SDK (unofficial)

-----------------------------------------------------------------------
Getting Started.
使用前に。

To personalize a mobile web application, you need to authorize the user with Facebook. Once the user has authorized your application, you can fetch user profile data from the Graph API. You can also ask the user for special permission to publish messages to the user's Wall from your application.

モバイルウェブアプリケーションを個人化するために、あなたは、Facebookと共にユーザに権限を与える必要があります。 ユーザがいったんあなたのアプリケーションを認可すると、あなたはGraph APIからのユーザ・プロファイルデータをとって来ることができます。 また、あなたはメッセージをあなたのアプリケーションからユーザのWallに発表する特許をユーザに求めることができます。

Facebook has released SDKs for PHP and Python for the the Graph API to make it easier to develop mobile apps in those languages.

Graph APIでそれらの言語におけるモバイルアプリケーションを開発するのが、より簡単になるように、FacebookはPHPとパイソンのためのSDKsをリリースしました。

-----------------------------------------------------------------------
Mobile Authentication
モバイル認証

Facebook uses OAuth 2.0 for authentication and authorization. Read the authentication guide for more details about Facebook's implementation of OAuth.


Facebookは認証と承認にOAuth2.0を使用します。 FacebookのOAuthの実現に関するその他の詳細のために認証ガイドを読んでください。



Mobile web applications use the same authorization endpoints as normal web applications, using a special argument (display) to specify the mobile version of the authorization dialog. There are two options for display relevant to mobile web applications:

モバイルウェブアプリケーションは通常のウェブアプリケーションと同じ承認終点を使用します、承認対話のモバイルバージョンを指定するのに、特別な主張(ディスプレイ)を使用して。 モバイルウェブアプリケーションに関連しているディスプレイのための2つのオプションがあります:

wap    Older mobile web browsers
touch    Smartphone, full featured web browsers
For example, to authorize a user using the WAP-friendly authorization UI, redirect the user to the following URL:

オールダーモバイルウェブブラウザ接触Smartphone、完全な特集されたウェブブラウザForの例を縛って、WAPに優しい承認UIを使用することでユーザに権限を与えて、以下のURLにユーザを向け直してください:


  「原文はここにソースコード」

The resulting dialog looks like this:
結果として起こる対話はこれに似ています:





End-to-end, this is how you authorize a user in a mobile web application:

終わるために終わってください、そして、これはあなたがモバイルウェブアプリケーションでどうユーザに権限を与えるかということです:

Register your application to get an application id and secret. Your application id is your client_id and your application secret is your client_secret.

アプリケーションを登録して、アプリケーションイドと秘密を得てください。 あなたのアプリケーションイドはあなたのクライアント_イドです、そして、あなたのアプリケーション秘密はあなたのクライアント_秘密です。

Redirect the user to https://graph.facebook.com/oauth/authorize with your client_id and the callback URL. Specify display depending on the type of mobile device your application is targeting. Example:

クライアント_イドとコールバックURLで https://graph.facebook.com/oauth/authorize にユーザを向け直してください。 あなたのアプリケーションが狙っているモバイル機器のタイプに頼るディスプレイを指定してください。 例:

  「原文はここにソースコード」

After the user authorizes your application, we redirect the user back to the callback URL you specified with the argument code, which can be exchanged for an oauth access token. Exchange it for an access token by fetching https://graph.facebook.com/oauth/access_token. Example:

ユーザがあなたのアプリケーションを認可した後に、私たちは、あなたがoauthアクセストークンと交換できる議論コードで指定したコールバックURLにユーザを向け直して戻します。 魅惑的な https://graph.facebook.com/oauth/access_token によるアクセストークンとそれを交換してください。 例:

  「原文はここにソースコード」

Use the access token returned by the request above to fetch data from the Graph API on behalf of the user. Example:

ユーザを代表してGraph APIからのデータをとって来るために要求で上に返されたアクセストークンを使用してください。 例:

  「原文はここにソースコード」
Facebook c 2010

Apps on Facebook.com の訳

http://developers.facebook.com/docs/guides/canvas/

Apps on Facebook.com の訳
EXCITE機械翻訳です。

ホーム :  Documentation :  Apps on Facebook.com

------------------------------------------------------------------------
Introduction
導入

Building an application on Facebook gives you the opportunity to deeply integrate into the core Facebook experience. By leveraging Facebook's integration points you can make your application feel native to the site, and create a seamless experience as users browse Facebook. Your application can integrate with all aspects of the Facebook user experience, from the profile page to bookmarks and the stream.

Facebookでアプリケーションを組立てると、深くコアFacebook経験と統合する機会はあなたに与えられます。 Facebookの統合ポイントに投機することによって、ユーザがFacebookをブラウズするとき、あなたは、あなたのアプリケーションがサイト固有であると感じさせられて、シームレスの経験を作成できます。 あなたのアプリケーションはプロフィールページからブックマークまでのFacebookユーザー・エクスペリエンスの全面と流れと統合されることができます。

Applications that run within Facebook use all the same fundamental technologies as websites which integrate Facebook. Other than some differences in user authentication, all of the technologies discussed in the Facebook for Websites guide are available to applications on Facebook. You should start with that guide if you are new to developing with Facebook's APIs.

Facebookの中で稼働するアプリケーションは、Facebookを統合するウェブサイトと同じすべての基本的な技術を使用します。 ユーザー認証のいくつかの違いを除いて、WebsitesガイドのためにFacebookで議論した技術のすべてがFacebookでアプリケーションに利用可能です。 FacebookのAPIで展開するのに慣れないなら、あなたはそのガイドから始めるべきです。

This guide walks you through the basics of getting your application set up and provides an overview of the key Facebook integration points.

このガイドは、あなたのアプリケーションをセットアップさせる基礎を通してあなたを歩いて、主要なFacebook統合ポイントの概要を提供します。

Canvas

Bookmarks


Dashboards

Requests

------------------------------------------------------------------------
Getting Started
はじめましょう

When you build an application on Facebook, your application's primary page views come via the canvas page, an iframe hosted by Facebook at http://apps.facebook.com/your_app/ that points to your application. When you register your application, you choose a Canvas Page URL (your_app in the example above) and a Canvas Callback URL (e.g., http://www.example.com/canvas/). When a user visits http://apps.facebook.com/your_app/, Facebook loads your specified Canvas Callback URL within an iframe on that page. Likewise, when a user visits http://apps.facebook.com/your_app/foo/bar, Facebook loads the URL http://www.example.com/canvas/foo/bar in the canvas page iframe.

あなたがFacebookでアプリケーションを組立てるとき、キャンバスページ(あなたのアプリケーションを示す http://apps.facebook.com/your_app/ でFacebookに接待されたiframe)であなたのアプリケーションの第一のページ・ビューは来ます。 あなたのアプリケーションを登録するとき、あなたは、CanvasページURL(上記の例のあなたの_装置)とCanvas Callback URL(例えば、 http://www.example.com/canvas/ )を選びます。 ユーザが http://apps.facebook.com/your_app/ を訪問するとき、Facebookはそのページのiframeの中であなたの指定されたCanvas Callback URLをロードします。 ユーザが http://apps.facebook.com/your_app/foo/bar を訪問するとき、同様に、FacebookはキャンバスページiframeでURL http://www.example.com/canvas/foo/bar を積み込みます。

To get started, register your Facebook application. Once you have entered your basic application information, click the "Canvas" tab on the left hand side of the configuration screen, and specify a Canvas Page URL and Canvas Callback URL for your application:

開始するには、Facebookアプリケーションを登録してください。 あなたは、一度、あなたの基本出願情報を入力して、構成スクリーンの左側を「キャンバス」タブをクリックして、CanvasページURLとCanvas Callback URLをアプリケーションに指定します:

 
 
To test that things are working properly, put up a simple page at your Canvas Callback URL and visit http://apps.facebook.com/your_app/. You should see your page load in the Canvas Page iframe:

いろいろなことは、それをテストするために、適切に働いていて、あなたのCanvas Callback URLで簡単なページを提供して、 http://apps.facebook.com/your_app/ を訪問します。あなたは、あなたのページがCanvasページiframeでロードされるのを見るべきです:



------------------------------------------------------------------------
Authentication
認証

Canvas applications use cookies to get user authentication information. The cookie includes a signature for all the values as the argument sig. The signature scheme is described in detail in the Canvas authentication guide. This PHP snippet returns all the official Facebook arguments and verifies the signature with your app's Application Secret:

キャンバスアプリケーションは、ユーザー認証情報を得るのにクッキーを使用します。 クッキーは議論sigとしてすべての値のための署名を含んでいます。 署名体系はCanvas認証ガイドで詳細に説明されます。 このPHP切れ端は、すべての公式のFacebook議論を返して、あなたの装置のApplication Secretとの署名について確かめます:

  「原文はここにソースコード」


When a user first visits your application, he or she will not be logged in to it. In this state, the cookie won't include uid. The recommended way to handle this case is to render a logged out version of your application with a Facebook login button, just like you would on a Facebook Connect site:

ユーザが最初にそちらのアプリケーションを訪問するとき、その人はそれにログインしないでしょう。 この状態では、クッキーはuidを含まないでしょう。 本件を扱う推奨方法はFacebookログインボタンであなたのアプリケーションの登録された出ているバージョンを表すことです、あなたがまさしくFacebook Connectサイトでそうするように:

  「原文はここにソースコード」

Check out the full PHP example application on GitHub for working "Getting Started" examples to copy to get started more quickly.

よりはやく開始するためにコピーするために「使用前に」の例を扱うためにGitHubで完全なPHP実例応用を調べてください。

------------------------------------------------------------------------
Making API Calls.
APIを作るのは呼びます。

We are currently in the process upgrading our core server API from the old REST API to the more modern Graph API. However, most of the methods required for canvas applications to integrate with Facebook have not yet been upgraded to the new API. For the time being, we recommend you continue using the old REST API in canvas apps instead of the new APIs for the sake of completeness.

私たちは、現在、私たちのコアサーバAPIを古いREST APIから、より現代のGraph APIまでアップグレードさせながら、プロセスにいます。 しかしながら、キャンバスアプリケーションがFacebookと統合されるのに必要であるメソッドの大部分はまだ新しいAPIにアップグレードしていません。 当分の間、私たちは、あなたが、新しいAPIの代わりにキャンバスアプリケーションで完全を期すために古いREST APIを使用し続けることを勧めます。

Included in the arguments passed to your canvas callback URL is oauth_access_token. That argument can be used to make OAuth 2.0-authenticated calls to the REST API on behalf of the active user. For example, you can call the friends.get method by fetching the URL:

あなたのキャンバスコールバックURLに通過された議論に含まれているのは、oauth_アクセス_トークンです。 活発なユーザを代表してOAuthをREST APIへの2.0で認証された呼び出しにするのにその議論を使用できます。 例えば、あなたは、URLをとって来ることによって、friends.getをメソッドと呼ぶことができます:

  「原文はここにソースコード」
 
In PHP, using the $args data structure above, you could fetch the current user's list of friends with:

PHPでは、$argsデータ構造を使用して、上では、あなたが以下で現在のユーザの友人のリストをとって来ることができました。

  「原文はここにソースコード」

------------------------------------------------------------------------
Integration Points.
統合は指します。

Once you have developed your application using the REST API, you can integrate your applications with the communication channels and integration points Facebook provides to help grow your user base and re-engage existing users. The most important integration points are:


REST APIを使用することでいったんあなたのアプリケーションを開発すると、あなたは、あなたのユーザベースを発展して、既存のユーザを再従事させるのを助けるために通信チャネルとFacebookが提供する統合ポイントがあるアプリケーションを統合できます。 最も重要な統合ポイントは以下の通りです。

Stream publishing
Requests
Bookmarks and Counters
Application and Games dashboards
Profile tabs

------------------------------------------------------------------------
Stream Publishing.
出版を流してください。

The stream is shown immediately to users upon logging into Facebook, making it core to the Facebook experience. You can prompt a user to publish stories about what she is doing in your application to her wall. If she publishes the story, it will appear on her wall and in all her friends' streams. Stories published from your application will include a link to your canvas page, and can optionally include an rich attachment. Effective use of stream publishing enables new users to discover your application, and existing users to re-engage with it.

それをFacebook経験へのコアにして、Facebookにログインするとき、流れはすぐに、ユーザに見せられます。 あなたは、ユーザが彼女があなたのアプリケーションで壁にしていることに関する話を発表するようにうながすことができます。 彼女が話を発表すると、それは彼女の壁と彼女のすべての友人の流れに現れるでしょう。 あなたのアプリケーションから発表された話は、あなたのキャンバスページへのリンクを含んで、任意に豊かな付属を含むことができます。 流れの出版の有効な使用は、新しいユーザが、あなたのアプリケーション、および既存のユーザがそれに再従事すると発見するのを可能にします。

A basic example of how to prompt a user to publish a story using the Facebook JavaScript SDK:

ユーザが話を発表するようにどうFacebook JavaScript SDKを使用することでうながすかの基本の例:

  「原文はここにソースコード」

The code above prompts the user with this dialog:

上のコードはこの対話でユーザをうながします:

 

Read the complete documentation on stream publishing and attachments.
流れの出版と付属に関する完全なドキュメンテーションを読んでください。
------------------------------------------------------------------------
Requests.
要求。

Requests are a great way to enable users to invite their friends to your application, and for users to confirm connections from your application. As an example if user A wants to invite user B to join a group inside your application, user A could send user B a request, asking if user B would like to join. User B will receive the request and have the opportunity to respond. Users can easily send requests by simply clicking on friend's faces and hitting send.

要求は、ユーザがあなたのアプリケーションに彼らの友人を招待するのを可能にするかなりの方法であり、あなたのアプリケーションから接続を確認するユーザのためにそうです。 例として、ユーザAが、ユーザBがあなたのアプリケーションで仲間に入るよう誘いたいなら、ユーザAはユーザBに要求を送るかもしれません、ユーザBが加わりたがっているかどうか尋ねて。 ユーザBは、要求を受け取って、応じる機会を持つでしょう。 ユーザは、単に友人の顔をクリックすることによって、容易に要求を送ることができます、そして、当たりは発信します。

Using FBML tags you can render request forms and friend selectors. There are many ways to customize your requests including the display of the friend selector, and what options are available to the recipient of the request. Complete documentation is available here. Iframe applications simply need to wrap the FBML tags in a <fb:serverFbml> tag for them to render.

FBMLタグを使用して、あなたは依頼状用紙と友人セレクタをレンダリングできます。 友人セレクタのディスプレイであって要求の受取人にとって、どんなオプションが利用可能であるかを含むあなたの要求をカスタマイズする多くの方法があります。 完全なドキュメンテーションはここで入手できます。 Iframeアプリケーションは、単にそれらがレンダリングする<fb: serverFbml>タグでFBMLタグを包装する必要があります。

An example request form:
例の依頼状用紙:

  「原文はここにソースコード」


The above code renders this on your canvas page:
上のコードはあなたのキャンバスページでこれをレンダリングします:

 

After the user chooses a friend and clicks Send, the request will look like this to the recipient:

ユーザが友人を選んで、Sendをクリックした後に、要求は、受取人にこれに似るでしょう:


------------------------------------------------------------------------

Bookmarks and Counters.
ブックマークとカウンタ。

Bookmarks enable users to easily navigate back to your application. Placing a bookmark button on your canvas page enables users to add your application to their list of bookmarks on the left column of the homepage. Once a user has installed your bookmark, you can set a counter which will appear next to it. You should set the counter to remind users of actions they need to take within your application.

ブックマークは、ユーザが容易にあなたのアプリケーションへナビゲートして戻るのを可能にします。 あなたのキャンバスページにブックマークのボタンを置くのは、ユーザがホームページの左のコラムで彼らのブックマークのリストにあなたのアプリケーションを追加するのを可能にします。 ユーザがいったんあなたのブックマークをインストールすると、あなたはそれの横で現れるカウンタを設定できます。 あなたは、カウンタにアプリケーションの中で取るように彼らが必要とする動作のユーザに思い出させるように設定するべきです。

Including the bookmark XFBML tag will render the bookmark button on your canvas page:

ブックマークのXFBMLタグを含んでいると、あなたのキャンバスページのブックマークのボタンはレンダリングされるでしょう:

  「原文はここにソースコード」

どれがこのボタンを発生させるでしょうか:


Complete documentation about the bookmark button can be found here.

ここでブックマークのボタンに関する完全なドキュメンテーションを見つけることができます。

When a user needs to return to your application, you should increment the counter:

ユーザが、あなたのアプリケーションに戻る必要があるとき、あなたは、カウンタを増加するべきです:

  「原文はここにソースコード」

This will increment the counter for this user:

これはこのユーザのためにカウンタを増加するでしょう:



Complete documentation on the counter can be found here.
ここでカウンタに関する完全なドキュメンテーションを見つけることができます。

------------------------------------------------------------------------
Application and Game Dashboards.
アプリケーションとゲームダッシュボード。

The Application and Game Dashboards help users discover and engage with applications on Facebook. A user's recently used applications appear at the top of the dashboard and a user's friends' recently used applications are shown in the bottom sections. When users engage with your application, it will automatically show up in the dashboard. To make your appearance in the dashboard more engaging you can publish news and activity. These are bullet point messages telling your users and their friends what is new in your application.

ApplicationとGame Dashboardsは、ユーザがFacebookでアプリケーションを発見して、交戦するのを助けます。 ユーザの最近中古のアプリケーションはダッシュボードの先端に現れます、そして、ユーザの友人の最近中古のアプリケーションは下部セクションで示されています。 ユーザがあなたのアプリケーションと交戦するとき、それはダッシュボードに自動的に現れるでしょう。 ダッシュボードでのあなたの出演をより魅力的にするように、あなたはニュースと活動を発表できます。 これらは、何があなたのアプリケーションで新しいかをあなたのユーザと彼らの友人に言う弾丸ポイントメッセージです。

For example, you can add news to a user's dashboard by calling:

例えば、あなたは、呼ぶことによって、ユーザのダッシュボードにニュースを加えることができます:

  「原文はここにソースコード」

This will appear in the user's dashboard:

これはユーザのダッシュボードに現れるでしょう:



There is a lot you can do to take advantage of the dashboards. Complete documentation can be found here.

あなたがダッシュボードを利用するためにできるいろいろな事があります。 ここで完全なドキュメンテーションを見つけることができます。

------------------------------------------------------------------------
Profile Tabs
プロフィールタブ


All profiles on Facebook have tabs. For example, users have a 'Photos' and a 'Links' tab by default. A user can add a tab for your application to her profile. When one of the user's friends visits her profile, the friend can check out the profile tab to get a sense of what your application is about, what the user has been doing in your application, and the friend can click back to your canvas page.

Facebookの上のすべてのプロフィールには、タブがあります。 例えば、ユーザには、'写真'と'リンクス'タブがデフォルトであります。 ユーザはあなたのアプリケーションのために彼女のプロフィールにタブを追加できます。 ユーザの友人のひとりが彼女のプロフィールを訪問するとき、友人は、あなたのアプリケーションが関することに関する感覚を得るためにプロフィールタブを調べることができます、ユーザがあなたのアプリケーションでしていること、友人はあなたのキャンバスページとクリックであって戻りできます。

To enable users to add a profile tab, set a tab name and a tab URL in the Facebook Developer app:

ユーザがプロフィールタブを加えるのを可能にするには、Facebook Developer装置にタブ名とタブURLを設定してください:

Including the add profile tab XFBML tag will render a button on your canvas page allowing users to add a tab for your application:

包含、ユーザがあなたのアプリケーションのためにタブを加えるのを許容しながら、キャンバスページでXFBMLタグがボタンをするプロフィールタブを加えてください:

  「原文はここにソースコード」

When a user navigates to the profile tab, Facebook makes a request to the tab URL you specified. A number of POST parameters are included with the request. You can verify the parameters using the same technique described here, but using $_POST parameters instead of the parameters from the cookie.

ユーザがプロフィールタブへナビゲートするとき、Facebookは要求をあなたが指定したタブURLにします。 多くのポストパラメタが要求で含まれています。 You can verify the parameters using the same technique described here, but using $_POST parameters instead of the parameters from the cookie.

Facebook does not pass back who the viewing user is when she first visits your tab. Facebook does send the profile owner's ID in the fb_sig_profile_user parameter, so you know whose profile to display content for. See Authentication for more information.

彼女が最初にそちらのタブを訪問するとき、Facebookは、見ているユーザが人であることを戻しません。 Facebookがfb_sig_プロフィール_ユーザパラメタのプロフィール所有者のIDを送るので、あなたはだれのプロフィールのために内容を表示するかがわかります。 詳しい情報に関してAuthenticationを見てください。

------------------------------------------------------------------------
Performance
パフォーマンス

To improve the speed and reliability of your application, check out the Performance Guide.

あなたのアプリケーションの速度と信頼性を改良するには、パフォーマンスガイドを調べてください。


Facebook c 2010

Facebook Documentationの訳

Facebook Documentationの訳
http://developers.facebook.com/docs/
(excite 機械翻訳です。)

Documentation
ホーム :  Documentation

------------------------------------------------------------------------
Getting Started.
使用前に。

At Facebook’s core is the social graph    people and the connections they have to everything they care about. Facebook Platform is the set of APIs and tools which enable you to integrate with the social graph to drive registration, personalization and traffic    whether through applications on Facebook.com or external websites and devices. Get started with Facebook for:

Facebookのところでは、コアは、心配するすべてには彼らがいる、ソーシャルグラフの人々と接続です。 Facebook Platformは、あなたがFacebook.comにおけるアプリケーションか外部のウェブサイトとデバイスにかかわらず登録、個人化、およびトラフィックを追い立てるためにソーシャルグラフと統合するのを可能にするAPIとツールのセットです。 以下のためにFacebookと共に開始してください。

- Websites.
- Apps on Facebook.com .
- Mobile apps.

- ウェブサイト。
- Facebook.comにおけるアプリケーション。
- モバイルアプリケーション。


If you already develop with Facebook, read our upgrade guide to learn how to transition to our new tools.

Facebookと共に既に展開するなら、私たちのアップグレードガイドを読んで、私たちの新しいツールへの変遷へのその方法を学んでください。

------------------------------------------------------------------------Overview.
概要。

- Graph API.
- グラフAPI。

The Graph API is the core of Facebook Platform, enabling you to read and write data to Facebook. It provides a simple and consistent view of the social graph, uniformly representing objects (e.g., people, photos, events, and pages) and the connections between them (e.g., friendships, likes, and photo tags).

あなたがFacebookにデータを読み書きするのを可能にして、Graph APIはFacebook Platformのコアです。 それはソーシャルグラフの簡単で一貫した意見を提供します、一様に、目的(例えば、人々、フォト、イベント、およびページ)と彼らの間の接続(例えば、友情、同類、およびフォトタグ)の代理をして。

- Authentication.
- 認証。

Facebook authentication enables your application to interact with the Graph API on behalf of Facebook users, and it provides a powerful single-sign on mechanism across web, mobile, and desktop apps.

Facebook認証は、あなたのアプリケーションがFacebookユーザを代表してGraph APIと対話するのを可能にします、そして、それはウェブ、モバイル、およびデスクトップアプリケーションの向こう側に強力なシングルサインオンメカニズムを前提とします。

- Social plugins.
- 社会的なプラグイン。

Social plugins enable you to provide engaging social experiences to your users with just a line of HTML. Because the plugins are served by Facebook, the content is personalized to the viewer whether or not they have signed into your site.

社会的なプラグインは、あなたが、あなたのユーザへの社会経験を従事させるのをまさしくHTMLの系列を提供するのを可能にします。 プラグインがFacebookによって役立たれているので、それらがあなたのサイトに署名したか否かに関係なく、内容はビューアーに個人化されます。

- Open Graph protocol.
- 開いているGraphは議定書を作ります。

The Open Graph protocol enables you to integrate your pages into the social graph. These pages gain the functionality of other graph objects including profile links and stream updates for connected users.

オープンGraphプロトコルは、あなたがページをソーシャルグラフと統合するのを可能にします。 これらのページは接続ユーザのためにプロフィールリンクとストリームアップデートを含む他のグラフオブジェクトの機能性を獲得します。
------------------------------------------------------------------------
API Reference.

- Core APIs
-- Graph API
-- Social plugins

- Facebook SDKs
-- JavaScript SDK
-- PHP SDK
-- Python SDK
-- iPhone SDK
-- Android SDK (unofficial)

-Advanced APIs
--Facebook Query Language (FQL)
--Facebook Markup Language (FBML)
--Old REST API

Facebook c 2010

Facebook for Websites の訳

ほぼ機械翻訳です。

原稿は、
http://developers.facebook.com/docs/guides/web
です。


Facebook for Websites
ホーム :  Documentation :  Facebook for Websites

Introduction.
序論。

The Facebook Platform enables you to make your website more personalized and social. You can mix and match Facebook's APIs to best meet your goals:

(excite 機械翻訳)
Facebook Platformは、あなたがウェブサイトをさらに個人化されていて社会的にするのを可能にします。 あなたは、あなたの目標を最もよく達成するためにFacebookのAPIを混ぜて、合うことができます:

Registration + Login.
登録+ログイン。

   With a single dialog, you can access data including a user's real name, email address, profile picture and list of friends. Replace or supplement your user account system with Facebook to help drive signups and improve data quality.

(excite 機械翻訳)
ただ一つの対話で、友人のユーザの本名、Eメールアドレス、プロフィール画像、およびリストを含んでいて、あなたはデータにアクセスできます。 Facebookと共にユーザ勘定科目体系を置き換えるか、または補って、signupsを運転して、データの品質を向上させるのを助けてください。

Engagement.
約束。

   With Facebook users comes their friends; incorporate these connections to make your product more engaging. Social plugins like the Like button and the activity feed enable you to offer social experiences with just a line of HTML. The Graph API enables you to integrate the social graph into your site in deep and compelling ways.

(excite 機械翻訳)
Facebookユーザと共に、彼らの友人は来ています。 これらの接続を取り入れて、貴社の製品をより魅力的にしてください。 Likeボタンと活動給送のような社会的なプラグインは、あなたがまさしくHTMLの線の社会経験を提供するのを可能にします。 Graph APIは、あなたが深くて無視できない方法でソーシャルグラフをサイトと統合するのを可能にします。

Growth.
成長。

   You can publish content from your site into the social graph to reach your users' friends. The Like button enables users to share your site's content back to their Facebook stream with one click. In addition, you can integrate pages deeply into the social graph via the Open Graph protocol.

(excite 機械翻訳)
あなたは、あなたのユーザの友人に届くようにあなたのサイトからの内容をソーシャルグラフに発表できます。 Likeボタンは、ユーザが1つのクリックで彼らのFacebookの流れとあなたのサイトの内容を共有して戻すのを可能にします。 さらに、あなたはオープンGraphプロトコルでページを深くソーシャルグラフと統合できます。

This guide will walk you through the basics of creating a web application with some of these features. If you aren't sure where to start after reading this guide, check out the Platform showcase for inspiration from other sites.

(excite 機械翻訳)
このガイドはこれらの特徴のいくつかでウェブアプリケーションを作成する基礎を通してあなたを歩くでしょう。 このガイドを読んだ後に確実にどこから出発しないかなら、他のサイトからのインスピレーションのためのPlatformショーケースを調べてください。

-----------------------------------------------------------------------
Contents.

- Social plugins
- Single sign-on
- Account registration data
- Server-side personalization
- Analytics
- What next?

コンテンツ。

(excite 機械翻訳)
- 社会的なプラグイン
- サインします単一の。
- アカウント登録データ
- サーバサイド個人化
- 分析法
- 次は何?

-----------------------------------------------------------------------
Social Plugins.
社会的なプラグイン。

Social plugins are the easiest way to get started with Facebook Platform. The plugins are embeddable social features that can be integrated in your site with a line of HTML. Because they are hosted by Facebook, the plugins are personalized for all users who are logged into Facebook   even if the users haven't yet signed up for your site.

(excite 機械翻訳)
社会的なプラグインは、Facebook Platformと共に開始する最も簡単な方法です。 プラグインは、あなたのサイトでHTMLの行と統合できるembeddable社会的な特徴です。 それらがFacebookに接待されるので、プラグインはユーザがまだあなたのサイトに申し込みしていなくてもFacebookがログインするすべてのユーザのために個人化されます。

The most important social plugin is the Like button, which enables users to post pages from your site back to their Facebook profile with one click. You can add a Like button to any page with an iframe tag:

(excite 機械翻訳)
最も重要な社会的なプラグインはLikeボタンです。(そのボタンは、ユーザが1つのクリックであなたのサイトからそれらのFacebookプロフィールまでページを掲示するのを可能にします)。 あなたはiframeタグでLikeボタンをどんなページにも追加できます:


「原文はここに絵または、ソースコード」
      
There are a number of options for the Like button, including the option to include the names and profile pictures of the user's friends who have also liked the page. Here is a like button for the Facebook Developers site:

(excite 機械翻訳)
Likeボタンのための多くのオプションがあります、また、ページが好きであったユーザの友人の名前とプロフィールの絵を含むようにオプションを含んでいます。 ここに、Facebook Developersサイトへの好きボタンがあります:


「原文はここに絵または、ソースコード」

Once you have included Like buttons on a lot of your pages, you can use other social plugins to turn those user interactions into more engaging experiences throughout your site. For example, you can use the activity feed plugin to show users a stream of the recent likes and comments from their friends on your site, and you can use the recommendations plugin to show personalized page recommendations to your users based on the likes and comments across your entire site. Here are the activity and recommendations plugins for the Facebook Developers site:

(excite 機械翻訳)
いったんあなたの多くのページのLikeボタンを入れると、あなたは、あなたのサイト中でそれらのユーザ相互作用をより魅力的な経験に変えるのに他の社会的なプラグインを使用できます。 例えば、あなたは、あなたのサイトで彼らの友人からユーザに最近の同類とコメントの流れを見せているのに活動給送プラグインを使用できます、そして、あなたのユーザへの推薦があなたの全体のサイトの向こう側に同様のものとコメントに拠点を置いた個人化されたページを見せているのに推薦プラグインを使用できます。 ここに、Facebook Developersサイトへの活動と推薦プラグインがあります:

 「原文はここに絵または、ソースコード」

All social plugins can be integrated with your site with iframe tags or XFBML tags, special XML tags that can be included in your HTML pages and parsed by the JavaScript SDK. iframe tags don't have any dependencies, but XFBML tags are more flexible because they are not limited to the fixed size of the iframe. For example, the XFBML version of the Like button enables additional functionality like commenting that is not available in the iframe version. Here is the activity feed plugin as an iframe:

(excite 機械翻訳)
iframeタグかXFBMLタグですべての社会的なプラグインをあなたのサイトと統合できますが、あなたのHTML形式のページに含んでいて、JavaScript SDK. iframeタグが分析できる特別なXMLタグは、少しの依存も持っていませんが、それらがiframeの固定サイズに制限されないので、XFBMLタグは、よりフレキシブルです。 例えば、LikeボタンのXFBMLバージョンはコメントするようなiframeバージョンで利用可能でない追加機能性を可能にします。 ここに、活動給送プラグインがiframeとしてあります:

 「原文はここに絵または、ソースコード」

and the XFBML equivalent:
(excite 機械翻訳)
そして、XFBMLは同等です:

 「原文はここに絵または、ソースコード」

Get started by checking out our entire suite of social plugins.

(excite 機械翻訳)
私たちの社会的なプラグインの全体の一組を調べることによって、開始してください。
-----------------------------------------------------------------------
Single Sign-on.
シングルサインオン。

acebook enables you to remove the registration process for your site by enabling the user to log in to your site with their Facebook account. Once a user logs in to your site with their Facebook account, you can access their account information from Facebook, and they are logged in to you site as long as they are logged in to Facebook.

(excite 機械翻訳)
acebookは、ユーザがそれらのFacebookアカウントであなたのサイトにログインするのを可能にすることによってあなたが登録手続をサイトに移すのを可能にします。 ユーザがそれらのFacebookアカウントでいったんあなたのサイトにログインすると、あなたはFacebookからそれらの会計情報にアクセスできます、そして、Facebookにログインする限り、あなたへのサイトはそれらにログインします。

The Facebook Platform uses the OAuth 2.0 protocol for authorization. You can find all the details for Facebook's implementation of OAuth 2.0 in the authentication guide.

(excite 機械翻訳)
Facebook Platformは承認にOAuth2.0プロトコルを使用します。 あなたは認証ガイドにおける、FacebookのOAuth2.0の実現のための一部始終を見つけることができます。


While you can implement a complete login and signup system using OAuth 2.0 directly, the open source JavaScript SDK is a simple way to implement login and signup without worrying about the details of the protocol. When a user logs into your site, the SDK saves the credentials for the active Facebook user in a cookie on your site's domain so that you can use the user's identity easily in both your server-side and JavaScript code. It provides a single, simple callback so your application can automatically handle the complex set of authentication states that exist in a single-sign on system.

(excite 機械翻訳)
あなたは、直接OAuth2.0を使用することで完全なログインとsignupシステムを導入できますが、オープンソースJavaScript SDKは、プロトコルの詳細に心配せずにログインとsignupを実装する簡単な方法です。 ユーザがあなたのサイトにログインするとき、あなたがあなたのサーバ側とJavaScriptがコード化する両方で容易にユーザのアイデンティティを使用できて、SDKはあなたのサイトのドメインのクッキーの中の活発なFacebookユーザのために資格証明書を貯蓄します。 あなたのアプリケーションが自動的にシングルサインオンシステムに存在する複雑なセットの認証州を処理できるように、それは単一の、そして、簡単なコールバックを提供します。

For example, if a user has previously logged into your web site, but they don't have a cookie for your site in the current browser, the SDK will automatically detect that condition and instantly log the user into your site without requiring them to click a Facebook login button again.

(excite 機械翻訳)
例えば、ユーザが以前に、あなたのウェブサイトにログインしましたが、彼らが現在のブラウザのあなたのサイトへのクッキーを持っていないと、彼らが再びFacebookログインボタンをクリックする必要でなくて、SDKは自動的にその状態を検出して、即座にあなたのサイトにユーザをログインするでしょう。

The JavaScript SDK requires that you register your application with Facebook to get an app id for your site. Once you have your app id, add this to the bottom of your page:

(excite 機械翻訳)
JavaScript SDKは、あなたが装置イドをあなたのサイトに得るためにFacebookにアプリケーションを登録するのを必要とします。 装置イドがいったんあると、ページの下部にこれを加えてください:

 「原文はここに絵または、ソースコード」

The auth.sessionChange callback is called every time a user logs in or out of your site. It is automatically called, e.g., when the user is logged into Facebook and has previously logged into your site, but they are missing a cookie for your site in their current browser.

(excite 機械翻訳)
uth.sessionChange回収はユーザがログインするときはいつも、呼ばれるか、あなたのサイトから脱しています。 例えば、ユーザがFacebookがログインして、以前にあなたのサイトをログインしたとき、それは自動的に呼ばれますが、それらは彼らの現在のブラウザのあなたのサイトへのクッキーをなくしています。

With the API initialized, you can pop up a Facebook authorization dialog by calling the FB.login JavaScript method, or you can include the standard Facebook login button with the <fb:login-button> tag:

(excite 機械翻訳)
APIが初期化されている状態で、あなたが、FB.login JavaScript方法を呼ぶことによって、Facebook認可対話をポップアップできますか、またはあなたは<fb: ログインボタン>タグがある標準のFacebookログインボタンを入れることができます:

 「原文はここに絵または、ソースコード」

which renders the standard Facebook login button:

(excite 機械翻訳)
どれが標準のFacebookログインボタンをレンダリングしますか:



What do you do once the user is logged in? You can fetch data from Facebook via JavaScript with the FB.api method, but some of the most interesting integrations involve server-side code. The JavaScript API saves the details for the logged in user in a signed cookie named fbs_APP_ID. Here is a complete PHP script that implements single-sign on with the JavaScript SDK, using the cookie so that a Facebook login button is only shown for logged out users:

(excite 機械翻訳)
ユーザがいったんログインすると、あなたは何をしますか? あなたはFB.apiメソッドがあるJavaScriptでFacebookからのデータをとって来ることができますが、最もおもしろい集積密度のいくつかがサーバサイドコードにかかわります。 JavaScript APIはfbs_APP_IDという署名しているクッキーの中のログインしているユーザのために詳細を保存します。 クッキーを使用して、JavaScript SDKと共にシングルサインオンを実装する完全なPHPスクリプトがここにあるので、Facebookログインボタンのために目立つだけであるのは、ユーザをログアウトしました、:

 「原文はここに絵または、ソースコード」

The cookie saved by the API also has an access_token property in addition to the uid. With that token, you can make secure calls to the Graph API to personalize your site's content to the active user. For example, this line of PHP fetches the active user's profile:

(excite 機械翻訳)
また、APIによって取っておかれたクッキーは、uidに加えてアクセス_トークンの特性を持っています。 そのトークンで、あなたは、あなたのサイトの内容を活発なユーザに個人化するためにGraph APIへの安全な電話をかけることができます。 例えば、PHPのこの系列は活発なユーザのプロフィールをとって来ます:

 「原文はここに絵または、ソースコード」

-----------------------------------------------------------------------
Account Registration Data.
登録がデータであることを説明してください。

The Graph API can provide access to all of the basic account registration data you would typically request in a sign-up form for your site, including name, email address, profile picture, and birthday. By using Facebook instead of a web form, a new user can provide all of the information required for site registration with a single dialog (no typing required!). Likewise, the information is more reliable than the information you would get in a web form. For example, the email address provided via Facebook has been verified by Facebook, so it does not need to be re-verified by your site.

(excite 機械翻訳)
Graph APIはあなたのサイトのためのサイン上がっているフォームの通常ご要望であるだろうことの基本のアカウント登録データのすべてへのアクセスを提供できます、名前、Eメールアドレス、プロフィール画像、および誕生日を含んでいます。 ウェブフォームの代わりにFacebookを使用することによって、新しいユーザはサイト登録にただ一つの対話で必要である情報のすべてを提供できます(タイプは必要ではありません!)。 同様に、情報はあなたがウェブフォームで得る情報より信頼できます。 例えば、Facebookを通して提供されたEメールアドレスが、Facebookが確かめられたので、あなたのサイトによってそれは再確かめられる必要はありません。

Some of the basic account registration data you might want to collect in your registration process is private, so it requires requesting extended permissions from the user in the login process. Check out the authentication guide for more details about extended permissions. To request the user's email address and birthday in the login process, use the perms argument to the fb:login-button tag to request the required permissions:

(excite 機械翻訳)
あなたがあなたの登録手続で集めたいかもしれない基本のアカウント登録データのいくつかが個人的であるので、それは、ログインプロセスのユーザから拡張許容を要求するのを必要とします。 拡張許容に関するその他の詳細のために認証ガイドを調べてください。 ログインプロセスでユーザのEメールアドレスと誕生日を要求するには、fbへの議論: ログインボタンが必要な許容を要求するためにタグ付けをするパーマを使用してください:

 「原文はここに絵または、ソースコード」

This login button will produce an authorization dialog that looks like this:
(excite 機械翻訳)
このログインボタンはこれに似ている認可対話を生産するでしょう:



Once the user authorizes your site, you can fetch those fields from the user's profile:

(excite 機械翻訳)
ユーザがいったんあなたのサイトを認可すると、あなたはユーザのプロフィールからそれらの分野をとって来ることができます:

A user's profile picture can always be accessed at the same URL:

(excite 機械翻訳)
同じURLでいつもユーザのプロフィールの絵にアクセスできます:

For example, Mark Zuckerberg's profile picture is http://graph.facebook.com/4/picture. The URL will always refer to the most recent profile picture, which ensures that if a user updates their picture on Facebook, those changes will be reflected on your site.

(excite 機械翻訳)
例えば、マークZuckerbergのプロフィール画像は http://graph.facebook.com/4/picture です。 URLはいつも最新のプロフィール画像について言及するでしょう。(それは、ユーザがFacebookでそれらの画像をアップデートすると、それらの変化があなたのサイトで反映されるのを確実にします)。

------------------------------------------------------------------------
Server-side Personalization
サーバサイド個人化

Once you have hooked up single sign-on, you can increase the engagement on your site by personalizing the content on your site to a user based on her social graph. Every site is different, but the basic structure will likely look something like this:

(excite 機械翻訳)
サインするのを単一のいったん取り付けると、あなたは、サイトであなたのサイトで彼女のソーシャルグラフに基づくユーザに内容を個人化することによって、約束を増加させることができます。 あらゆるサイトが異なっていますが、基本構造はこのようにおそらく見えるでしょう:

 「原文はここに絵または、ソースコード」

Check out the Graph API for all the data available in Facebook Platform, and check out the Platform showcase for inspiration from other sites who have used Facebook for personalization.

(excite 機械翻訳)
Facebook Platformで利用可能なすべてのデータのためにGraph APIを調べてください、そして、個人化にFacebookを使用した他のサイトからのインスピレーションのためのPlatformショーケースを調べてください。

------------------------------------------------------------------------Analytics.
分析法。

Once your app is up-and-running, you can get detailed analytics about the demographics of your users and how users are sharing from your application with Insights.

(excite 機械翻訳)
あなたの装置がいったん活動するようになると、あなたはあなたのユーザとユーザがあなたのアプリケーションからInsightsとどう共有するかに関する人口に関する詳細な分析法を得ることができます。



Insights supports analytics broken down by application and by domain. The product includes rich data about users sharing content from your site within Facebook no matter where those shares originated. For example, if a user puts a URL from your site in their Facebook status message, that data is included in the analytics for your domain.

(excite 機械翻訳)
Insightsはアプリケーションとドメインのそばで砕けている分析法をサポートします。 製品はそれらのシェアがどこで起因したとしてもFacebookの中であなたのサイトからの内容を共有しているユーザに関する豊かなデータを含んでいます。 例えば、ユーザがそれらのFacebookステータスメッセージにあなたのサイトからのURLを入れるなら、そのデータはあなたのドメインへの分析法に含まれています。

The data from Insights is also included in the Graph API so you can integrate the Facebook analytics data with your own, in-house analytics systems.

(excite 機械翻訳)
また、あなたがあなた自身社内の分析法システムというのとFacebook分析法データを統合できるように、InsightsからのデータはGraph APIに含まれています。

------------------------------------------------------------------------What's Next?
何が次ですか?

Check out the Graph API. It is the core of the Facebook Platform and includes all the data and functionality available from Facebook.

(excite 機械翻訳)
グラフAPIを調べてください。 それは、Facebook Platformのコアであり、Facebookから利用可能なすべてのデータと機能性を含んでいます。

If you are considering developing a mobile version of your app, you should also check out the mobile app guide.

(excite 機械翻訳)
また、あなたの装置のモバイルバージョンを開発すると考えているなら、あなたはモバイル装置ガイドを調べるべきです。

If you want your website to be fast, check out the Performance Guide.

(excite 機械翻訳)
あなたのウェブサイトに速くあって欲しいなら、パフォーマンスガイドを調べてください。

May 1, 2010

twitter と連携しようかな の 調査結果

そうか、認証がtwitterまかせであれば、
自分はアプリに専念すればいいことになる。

と勢いさけて、調査
OAuthを確認し、入門を翻訳(このプロクの投稿にあり)
また、twitter の APIについても概観してみた。


・[狙い]twitter で ユーザ認証して、シームレスに、遺言預かり所へ移行する。
 これは、難しい感じ。というが、twitterにそぐわない感じ。

人気のtwitterアプリ58本をぐぐっとレビューしてみた


を読む。うーん、こんな感じなんですね。

ということで、感じばっかりの、チョットあきらめ宣言でした。


OAuth Part III : Security Architecture のガイド

Beginner’s Guide to OAuth  Part III : Security Architecture
By Eran Hammer-Lahav
Friday October 3, 2008

ここの訳は、しません。
理由は、残念ながら、時間がないためです。

ここにか借りていることは、暗号アルゴリズムが確かであり、
それがどんなものか説明しています。

かなり高度な暗号プロトコルの話であり、
一般の技術者にはあまり関係がありません。

IPsecやSSL/TLSの実装をしたことがある人や
それらのRFCを読みこなせる人向けの内容です。

概要をごく簡単に

Beyond Basic

 httpのベーシック認証を超えたものでありますという意味
 HTTPSを使うほうがいいねともいっていますが、必須ではないようです。


Direct & Delegated Access

 直接または代理アクセスの関係です
 つまり、3-legged scenario というか
 Service Provider, Consumer, and User の三者が絡むのです。

Credentials

 信任状です

Signature and Hash

 digital signatures デジタル署名技術を利用しています
  hash algorithm  SHA-1 を利用して
  shared secret による、 HMAC-SHA-1 を利用しています
  デモも見せてくれます。
 
Secrets Limitations
  RSA-SHA1 method を利用しています。
  この方法は、私の知る限りですが、
  IPsec IKEの鍵交換のひとつの方法として有名です。
  つまり、実績と信頼のおける方法です。

Timestamp and Nonce
  タイムスタンプとNONCE(乱数の一種)を
  利用しています。
  いろいろなセキュリティ攻撃を防御するためです。
 
Signature Methods
  略です。
 
Signature Base String
  略です。