I use following sourcecode to share a Feed on Facebook.
Explanation: I have many pictures and each picture has a own ShareButton with an onclick which starts the shareonfb(). And the first share works very well, it shares the picture, but if somebody clicks onto the share, it's opens the gallery which consist the picture(because, if i use for 'link' the direct picture-url, it would only open the picture and the person would not see the homepage).
Problem: If i try to reshare(to click on the share button in facebook at this share), facebook doesn't use the content of this variables. It uses the og:XXXX meta-tags which are at my website(where it goes by the 'link' url). Because of that, there is a other Picture and Text ...(the share-content has changed).
So, I don't understand why it does that ... I can only specify the datas/variables for 1 post/share ... that makes no sense. Then I could work directly with the og:xxx meta-tags. BUT I don't want that, because the pictures itself has no own html-page where i could place my own meta-tags(i show them "directly"(with fancybox). (I wanted to change the meta-tags by javascript, but I read here on stackoverflow that the facebook crawler doesn't run JS.) So, for what is the function to specific this datas?, and how get I Facebook to don't change it?
MfG Torben K
function shareonfb() {
var FB_ui_var = {
fb_method : 'feed',
fb_name : 'Name of picture',
fb_link : 'http://mysite.de/the_gallery_which_consist_the_picture027.html',
fb_caption : 'Description caption',
fb_picture : 'http://mysite.de/picture027.jpg',
fb_description : 'Descriton Text',
}
FB.ui({
method: FB_ui_var.fb_method,
name: FB_ui_var.fb_name,
link: FB_ui_var.fb_link,
caption: FB_ui_var.fb_caption,
picture: FB_ui_var.fb_picture,
description: FB_ui_var.fb_description,
}, function(response){});
}