I have a website with Facebook capabilities (Sending personal messages, posting to wall). I use both the PHP and JavaScript Facebook SDKs. For posting to users walls/FanPages I use the following JavaScript SDK feed dialog:
function generalPost(producerID, producerName, fanPageID)
{
var obj =
{
method: 'feed',
link: '<?php echo SEAT_NEAR_ME; ?>?producerID='+ producerID,
type: 'video',
picture: 'https://<?php echo DOMAIN; ?>/DATA/producersPic/<?php echo $_SESSION["IMG"];?>',
from: fanPageID,
to: fanPageID, //fan page ID
show_error: true,
name: producerName,
caption:' ',
description: ' '
};
FB.ui(obj, function(response){
if (response && response.post_id)
{
//post success
}
else
{
//alert('Post was not published.');
}
});
}
This produces the following dialog: (I’ve blurred the personal information)

I want to add ‘Photo / Video’ upload capability for my dialog, just as (or similar to) to the one on facebook:

I’ve googled about it and checked the Facebook docs and only found this:
I have two question:
- Is this what I need or is there any better way to write the photo/video dialog ?
- From the Facebook docs I’ve found, What does this means:
$my_url = "YOUR_POST_LOGIN_URL"
What isPOST_LOGIN_URL?
Thanks.
If you want to post photos / videos, then you will have to post the actual files to facebook using cURL or another method. This Blog Post details the process for uploading photos. You won’t be able to use the JavaScript Feed Dialog to upload photos / videos.
The
POST_LOGIN_URLis where you want the user to go after they have logged in.