Reputation: 426
I'm developing a referral application where users can refer their Facebook friends using a referral code. I'm using Facebook Javascript SDK. The problem I'm facing is that the send method works only for particular URLs, I mean if I change the users referral token in link parameter it gives me error 100 invalid link.
Here is the method :
FB.init({appId: app_id, xfbml: true, cookie: true});
FB.ui({
to : '********',
method: 'send',
name: 'Message',
link: 'example.com/emp?token=fAiS1ywL0lS8cUYtgLjk',
redirect_uri:'http://example.com'
});
For some particular link values it works fine but if the token is changed it fails with invalid link error.
I'm stuck with fixing this issue. Am I missing something?
Upvotes: 0
Views: 912
Reputation: 3198
Duplicate of Facebook FB.ui send dialog intermittently returns invalid link error.
For your second question related to the og:url
meta, to simplify you have to provide the URL of the current page.
The Open Graph Protocol says:
og:url - The canonical URL of your object that will be used as its permanent ID in the graph, e.g., "http://www.imdb.com/title/tt0117500/".
To understand how those metas work you can check how News websites implement this with the Facebook Object Debugger. For example this link shows you the implemention of metas for a well-known newspaper website.
Upvotes: 1