Failed to add image with url parameters in Facebook feed dialog (direct url)
1 answer
You need to code all parts correctly (Java Script example below):
var _FBAPPID = "xxxxxxxxxx", // your app ID (mandatory)
_name = "name",
_text = "text",
_link = "link",
_picture = "http://cdn2.insidermonkey.com/blog/wp-content/uploads/2012/10/facebook4-e1349213205149.jpg", // some google image - replace it
_caption = "caption",
_redirect_uri = "http://google.com" // this URL must be from within the domain you specified in your app settings
var _params = "&name=" + encodeURIComponent(_name)
+ "&description=" + encodeURIComponent(_text)
+ "&link=" + encodeURIComponent(_link)
+ "&picture=" + encodeURIComponent(_picture)
+ "&caption=" + encodeURIComponent(_caption)
+ "&redirect_uri=" + encodeURIComponent(_redirect_uri);
var _href = "http://www.facebook.com/dialog/feed?app_id=" + _FBAPPID + _params + "&display=touch";
I also added display=touch
because I am using a direct url for mobile only.
Source here .
0
source to share