javascript - Facebook already shared content not sharing that content instant of share other content -
my web site have facility share 2 thing on facebook
share web site(with site logo , thing website) on facebook ,
share question answer(with site logo , question answer) list of these on facebook.
when share question reply web site on facebook work fine share question answer.but if share 1 time again share question form facebook time share web site(with logo , thing website).
my code share on fb:-
function shareonfacebook(question, answer, id, url, appkey) { fb.init({ appid: appkey, }); var logourl = url + '/resources/image/logo.png'; if (id == 0) { linkurl = url+'/home/home.aspx'; } else { linkurl = url + '/patient/questiondetails.aspx?questionid=' + id; } fb.ui( { method: 'feed', name: unescape(question), description: ( unescape(answer) ), link: linkurl, picture: logourl }, function (response) { if (response && response.post_id) { alert('post published.'); } else { alert('post not published.'); } }); } anyone know why happening
guys found solution own question followed
on questiondetails.aspx page load need dynamically update og:title , og:description meta tag question selected.
first time when share share fb.ui method take title , description javascript when share facebook time take title , description meta tag , before solution facebook take meta tag master page, content web site name title , description of web site description.
javascript facebook facebook-graph-api facebook-javascript-sdk facebook-sharer
No comments:
Post a Comment