I'm beginning a blog and I wanted to make a 'FacebookStatusApp' for the blog. All it has to do is get my latest status and get request it to my translator page. I can get my latest feed but the problem is the accesstoken. I found a way to keep refreshing my access_token every 9 minutes. It's a site called:
This site will call your url every X minutes. I chose 9 minutes.
My renew code is pretty simple:
<?php
$file = file_get_contents("fbat.txt");
$token = $file;
$token_url = "https://graph.facebook.com/oauth/access_token?client_id=100000280644272&client_secret=secret&grant_type=fb_exchange_token&fb_exchange_token=".$token;
$c = curl_init();
curl_setopt($c, CURLOPT_RETURNTRANSFER, 1);
curl_setopt($c, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($c, CURLOPT_URL, $token_url);
$contents = curl_exec($c);
$err = curl_getinfo($c,CURLINFO_HTTP_CODE);
curl_close($c);
$paramsfb = null;
//parse_str($contents, $paramsfb);
echo $contents;
?>
"Fbat.txt" contains the current AccessToken.
But I need a client_secret for my account. And I can't get a AccessToken for my facebook account :/
So my solution was creating a new app using MY ClientID and HIS ClientSecret with the 'GRAPH EXPLORER' to generate a access_token.
So my question is: How can I get MY latest status AND MY access_token. ?
If there is a good alternative (Ex. Using an APP) I could do that too.
Well, I hope you understand my question :P