Facebook FB.ui send dialog intermittently returns invalid link error -


this has been working fine on week.

fb.ui({   method: 'send',   to: connectionid,   name: subject,   picture: staticurl + 'images/logoformysite.png',   link: homeurl + '/' + username + '/something=' + var1 +'&somethingelse=' + encodeuri(var2) + '&evenmore=' + encodeuri(var3),   description: invitemessage, }); 

i had had error last week if url within facebook domain, facebook block it. fixed , both picture , link not belong facebook domain , come site. started happening today nothing changed. intermittent.

an error occurred. please try again later.  api error code: 100 api error description: invalid parameter error message: 'link' invalid. 

it not clear why works , not other times if sending same user. wondering if missed announcement. hope @ least fail consistently not case.


update: not sure how link setting in dialog can set globally on page. send recipients of message wrong link. helpful see example of how above work in new open graph world.

answer aug 12 2013

the issue revolved around our url being dynamic , needing force caching each time. make ajax call "https://developers.facebook.com/tools/debug/og/object" refresh , launch send dialog.

i had same issue , stopped working since last week.

here solution:

go facebook debugger , add url. click on "debug" , fix warnings displayed facebook.

to fix mine had add og.url meta tag in page. value should same 1 want share (no redirection). facebook sent me notification (alert):

your app, xxx, compliant stream post url security migration. no further action required.

try share link fb.ui once again , post should automatically display og values.

note: facebook october breaking change automatically use og metas instead of custom fb.ui parameters, therefore can activate breaking change ready , remove name/picture/description code.

update: problem can happens again if mentioned above correctly implemented.

if case that's because have enforce facebook "scrape" page. process automatically done facebook when use facebook object debugger or copy/paste link on timeline / private messages. if use javascript sdk have ask facebook index , cache page.

you won't find in facebook documentation related javascript sdk (or lucky) save days lost find unbelievable issue (remember facebook said link invalid) can find more details on this page.

i tried use graph api enforce newly created page scraped facebook, if works you lucky. second method not mentionned produced same result send request facebook object debugger page , add page link in url (e.g. https://developers.facebook.com/tools/debug/og/object?q=yourpageurlhere). doing facebook time scrape page , can share links facebook api, working.


Comments

Popular posts from this blog

c++ - Creating new partition disk winapi -

Android Prevent Bluetooth Pairing Dialog -

VBA function to include CDATA -