Created
October 12, 2012 15:34
-
-
Save davidino/3879804 to your computer and use it in GitHub Desktop.
facebook stream
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| require_once __DIR__ . '/../vendor/php-sdk/src/facebook.php'; | |
| /* | |
| some code | |
| */ | |
| $facebook = new Facebook(array( | |
| 'appId' => $app['facebook.app_id'], | |
| 'secret' => $app['facebook.app_secret'], | |
| )); | |
| /* | |
| some code | |
| */ | |
| $params = array( | |
| //'message' => 'Il tuo profilo è idoneo'."\n".'Ti abilitiamo all’entrata in Boost 190'."\n".'Vieni a ritirare il tuo pass.', | |
| 'link' => 'http://www.boost190.it/facebook', | |
| 'picture' => 'http://www.boost190.it/img/fb_reveal.jpg', | |
| 'name' => 'Accedi', | |
| 'description' => 'Il tuo profilo è idoneo. '."\n".'Ti abilitiamo all’entrata in Boost 190. '."\n".'Vieni a ritirare il tuo pass.', | |
| ); | |
| /* | |
| some code | |
| */ | |
| try{ | |
| $facebook->api("/$user_id/feed",'post',$params); | |
| }catch(FacebookApiException $e){ | |
| echo "[EXCEPTION]\t" . $e->getMessage() . "\t$user_id\n"; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment