Created
January 7, 2013 14:52
-
-
Save szbl/4475520 to your computer and use it in GitHub Desktop.
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 | |
// 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