Skip to content

Instantly share code, notes, and snippets.

@szbl
Created January 7, 2013 14:52
Show Gist options
  • Save szbl/4475520 to your computer and use it in GitHub Desktop.
Save szbl/4475520 to your computer and use it in GitHub Desktop.
<?php
// the post
$post = 'This is only a test. Please disregard this message. http://www.warnkenlaw.com';
$actions = array(
array(
'name' => 'Read Our Blog',
'link' => 'http://www.facebook.com'
)
);
$data = array(
'access_token' => $access_token,
'message' => $post,
'actions' => $actions
);
$url = 'https://graph.facebook.com/' . $page_id . '/feed';
$response = wp_remote_post( $url, array(
'body' => $data
));
// errors with 'actions' saying link must be valid URL... which it is...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment