Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

To use the Facebook connector, add the <facebook.init> element in your configuration before carrying out any other Faceboook operation. Most Graph API requests require the use of access tokens that the client application can generate by implementing Facebook Login .

The basic procedure to get a user token is for the client to request access and permission via the Facebook Login dialog. After the user is authenticated, the user is redirected to the user consent dialog. On completion of consent, the access token is returned to the client. For more information, refer to access tokens and how to generate them using Facebook Login.

...

Code Block
<albumId>{$url:album_id}</albumId>

Sample proxy to handle multipart operations

Code Block
languagehtml/xml
titlepostPhotoToAlbum
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="facebook_postPhotoToAlbum"
       transports="https,http"
       statistics="disable"
       trace="disable"
       startOnLoad="true">
   <target>
      <inSequence>
         <facebook.postPhotoToAlbum>
            <albumId>{$url:album_id}</albumId>
			<apiUrl>https://graph.facebook.com</apiUrl>
			<apiVersion>{$url:apiVersion}</apiVersion>
			<accessToken>{$url:accessToken}</accessToken>
         </facebook.postPhotoToAlbum>
         <respond/>
      </inSequence>
      <outSequence>
         <send/>
      </outSequence>
   </target>
   <description/>
</proxy>

...