Skip to content

Instantly share code, notes, and snippets.

@astrotars
Last active December 11, 2015 21:09
Show Gist options
  • Select an option

  • Save astrotars/4660076 to your computer and use it in GitHub Desktop.

Select an option

Save astrotars/4660076 to your computer and use it in GitHub Desktop.
<?php
if ($_POST['facebook'] == 1) {
$facebook = new FB_Post();
// build message
$data = array(
'message' => $smsmessage,
'name' => 'This is the name',
'picture' => 'http://www.bumpp.me/Merchant_Image/' . $merch['comp_logo_2'],
'link' => 'http://www.bumpp.me/',
'description' => 'This is a description',
'caption' => 'This is a caption'
);
// log out your data array
error_log(json_encode(data));
$facebook->postAsPage($merch['page_id'], $merch['fb_uid'], $fb_user_token, $data);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment