facebook - Post FB status from website admin, without pop up login -


i wondering if can done, because can twitter , linkedin, need build blog when post blog post on fb,twitter , linkedin...

so far run twitter api , linkedin, facing hard fb when want post should login on fb or pop fb login.

i wondering if there api can login configuration had..like api key, client id,etc..i found on twitter can don't have login twitter first make work? please if of have experience or deal , how solve it..thank before!! appreciate it..thanks!

best regards, harrison

a nice workaround short-lived access token, convert long-term access token , use it.

short-lived access token lasts hour or 2 whereas long-term access tokens have life span of 60 days time of creation. please note access token expired or dead when update password, de-authorize app,deactivate account.

see in code:

step generate short-lived access token:

https://graph.facebook.com/oauth/authorize?type=user_agent &client_id=<app_id> &redirect_uri=<redirect_uri> &scope=<set_of_permission> 

make required changes , go url, login , grant permissions, on next page redirected website short-lived access_token appended <redirect_uri>

for example: http://www.yourwebsite.com/#access_token=caaxxxxxxxxxxxxxx

<short_access_token> = caaxxxxxxxxxxxxxx

copy entire string between #access_token= , &expires_in=xxxx

step generate long-term access token

https://graph.facebook.com/oauth/access_token?grant_type=fb_exchange_token &client_id=<app_id> &client_secret=<app_secret_key> &fb_exchange_token=<short_access_token> 

copy string between access_token= , &expires=xxxxxxx

at step have long-term access_token last 60 days time of creation. can check life span converting value of expires days/hours.

use token via graph api server side. please note, mentioned server-side long-term access token sensitive , can used make changes,updates account.

p.s.: long-term access token doesn't require logged-in, has own advantages , disadvantages.


Comments

Popular posts from this blog

searchKeyword not working in AngularJS filter -

sequelize.js - Sequelize: sort by enum cases -

user interface - how to replace an ongoing process of image capture from another process call over the same ImageLabel in python's GUI TKinter -