Versions Compared

Key

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

...

Code Block
languagehtml/xml
titlecreateUserAchievement
<facebook.createUserAchievement>
	<achievement>{$ctx:achievement}</achievement>
</facebook.createUserAchievement>
 Properties 
  • achievement: Required - The unique URL of the type of achievement that the person will receive.    

...

Code Block
languagehtml/xml
titleisFriend
<facebook.isFriend>
	<sourceUserId>{$ctx:sourceUserId}</sourceUserId>
	<targetUserId>{$ctx:targetUserId}</targetUserId>
</facebook.isFriend>

 Properties 

  • sourceUserId: ID of the person to be determined.
  • targetUserId: ID of the user to be checked with. 

...

Anchor
publishPhoto
publishPhoto
Publishing photos

Allows the user to upload photos. This does not require init to be called before the operation. Refer to multipart processing for detailed information.

...

Following is a sample REST request for the publishPhoto method.

Code Block
languagehtml/xml
titleSample Request for publishPhoto
 curl -X POST \
     -d "source=%7Bimage-data%7D" \
         http://localhost:8280/services/facebook_publishPhoto?user_id={userId}

...

Code Block
languagehtml/xml
titlecreateEvent
<proxy xmlns="http://ws.apache.org/ns/synapse"
       name="facebook_createPost"
	   transports="https,http"
	   statistics="disable"
	   trace="disable"
	   startOnLoad="true">
  <target>
    <inSequence onError="faultHandlerSeq">
      <property name="apiUrl"
				expression="json-eval($.apiUrl)"/>
	  <property name="apiVersion"
                   expression="json-eval($.apiVersion)"/>
      <property name="accessToken"
				expression="json-eval($.accessToken)"/>
      <property name="achievement"
				expression="json-eval($.achievement)"/>
	  <property name="apiVersion"
				expression="json-eval($.apiVersion)"/>
	  <facebook.init>
            <apiUrl>{$ctx:apiUrl}</apiUrl>
			<apiVersion>{$url:apiVersion}</apiVersion>
            <accessToken>{$ctx:accessToken}</accessToken>
      </facebook.init>      
	  <facebook.createUserAchievement>
	     <achievement>{$ctx:achievement}</achievement>
      </facebook.createUserAchievement>
	  <respond/>
    </inSequence>
    <outSequence>
      <property name="messageType" value="application/json" scope="axis2" />
      <send/>
    </outSequence>
  </target>
</proxy>