Facebook side implementation ;
1.
Create Facebook App to interact with the PRPC
a.
Go to facebook developer and create an App
b.
Note down app Secret and App ID for
future reference
2.
Obtain authorization code from Facebook.
NOTE:
Sometimes
some web browsers are giving an errors so try with difference browsers (for me CROME
and IE)
a.
Assemble following
URL to get authorization code.
Use your APP ID to replace <APPID> on URL given below.
b.
You will redirect to a page where you can allow
your application to access your FB account info; click Allow button to give permission
to the APP;
c.
Browser will display Success message with URL contains
CODE param in it.
(Eg: http://www.facebook.com/connect/login_success.html?code=
7YaBbdlAXbh2ybD03pwLde4mNaTuu………… )
7YaBbdlAXbh2ybD03pwLde4mNaTuu………… )
d.
Copy “code=….. “ Parameter and it will use as the authorization
code.
3.
Obtain Access token from Facebook.
a.
Assemble following URL to get authorization code.
Use your APP ID, App secret, Authorization
Code to replace <APPID>,<Appsecret>,<authorization code> on
URL given below.
https://graph.facebook.com/oauth/access_token?client_id= <APPID>
&redirect_uri=http://www.facebook.com/connect/login_success.html&
client_secret=<Appsecret>&code= <authorization code>
&redirect_uri=http://www.facebook.com/connect/login_success.html&
client_secret=<Appsecret>&code= <authorization code>
b.
This URL will return FB access token on your
browser;
Remove “&expires=XXXX”
parameter from the end of the token when you use access token.
PRPC side implementation;
1.
Create 4 properties to hold the access
token,callback,FB messege and FB ID as below;
for FB ID use your own FB ID to get posted on your wall.
2.
Create Connect-HTTP rule to connect with FB
server;
a.
Set HTTP Method = GET, HTTP Version =1.1, Response Timeout=30000
b.
Defineà
callback, message, target_id ,access_token as parameters on the HTTP rule;
3.
Use previously created activity to call the
HTTP-Rule to post FB messege ;
Run and you will see the messege on your facebook wall .
No comments:
Post a Comment