Share Pastebin
Guest
Public paste!

Untitled

By: a guest | Feb 9th, 2010 | Syntax: PHP | Size: 1.04 KB | Hits: 38 | Expires: Never
Copy text to clipboard
  1. $message = 'Check out this cute pic.';
  2. $attachment = array( 'name' => 'i\'m bursting with joy',
  3.                                          'href' => 'http://icanhascheezburger.com/2009/04/22/funny-pictures-bursting-with-joy/',
  4.                                          'caption' => '{*actor*} rated the lolcat 5 stars',
  5.                                          'description' => 'a funny looking cat',
  6.                                          'properties' => array('category' => array( 'text' => 'humor', 'href' => 'http://www.icanhascheezburger.com/category/humor'), 'ratings' => '5 stars'), 'media' => array(array('type' => 'image', 'src' => 'http://icanhascheezburger.files.wordpress.com/2009/03/funny-pictures-your-cat-is-bursting-with-joy1.jpg', 'href' => 'http://icanhascheezburger.com/2009/04/22/funny-pictures-bursting-with-joy/')), 'latitude' => '41.4', 'longitude' => '2.19');
  7. $action_links = array( array('text' => 'Recaption this', 'href' => 'http://mine.icanhascheezburger.com/default.aspx?tiid=1192742&recap=1#step2'));
  8. $attachment = json_encode($attachment);
  9. $action_links = json_encode($action_links);
  10. $facebook->api_client->stream_publish($message, $attachment, $action_links);