c# - Facebook Application publish on facebook page -
i want facebook application create events in facebook page. use application able publish events facebook page, don't want give admin or contributor everyone, want web app ( appid + secret code) have rights publish
when i'm trying this:
client.accesstoken = "{app-id}|{app-secret}"; dynamic result = client.post("/{page-id}/events", new{ name = "testevent", start_time = "2014-04-11t19:00:00-0700", end_time = "2014-04-11t20:00:00-0700", } ); i received error
{ "error": { "type": "exception", "message": "you must admin of specified page perform requested action.", "code": 1373019 } } any idea?
you should following:
get page access token via
/me/accountsendpoint (the logged in user must administrator of page). can via https://developers.facebook.com/tools/explorer?method=get&path=me%2faccounts sure have requestedmanage_pages,create_event,publish_streampermissions beforehand.exchange short-lived page access token non-expiring 1 described here: what steps getting long lasting token posting facebook fan page server
use newly generated page access token in app
Comments
Post a Comment