i'm using instagram api. retrieve access token, use method parameter 'code'. code parameter, can build url returns me access token.
example :
https://instagram.com/oauth/authorize/?client_id=code_id&redirect_uri=my-redirect-url&response_type=code when reach url through web browser, after redirection instagram, returns web service created. then, access token stored.
how can automatize in php?
this example doesn't work:
exec('curl https://instagram.com/oauth/authorize/?client_id=code_id&redirect_uri=my-redirect-url&response_type=code'); how can handle redirection instagram?
thanks in advance.
there's no way automate since explicit user authentication required before authorization code generated. you'll have redirect using php:
header('location: https://instagram.com/oauth/authorize/?client_id=code_id&redirect_uri=my-redirect-url&response_type=code'); have user authenticate in browser instagram , grab code delivered redirect_uri instagram.
Comments
Post a Comment