In my index file, I display a randomized image from image.php file. I’m trying to find the way to get the image display in the index file to post to facebook wall.
Is there any way i can post an image generated from image.php to facebook wall?
//index file
<img src="image.php">
//post to wall file
$facebook->api("/me/feed", "post", array(
'message' => "",
'picture' => "", //same image from image.php goes here
'link' => "",
'name' => "",
'caption' => ""
));
If your site is example.com, this should work just fine:
Note: I’d recommend being consistent with your quotes – either always use single or double quotes, don’t mix them like you did here.
Update
Replace the image tag where you display the image with this:
image.php: