I tried to use FB.ui and share method to share dynamic gif.
The image was hosted in my own server. After shared, I found it was in static image.
Is it possible to host the gif other than GIPHY.com and some related images hosting websites? Any settings than need to be configured in my server?
I have tried to add mime type and add same value for og:url and og:image in html head section. But all of them failed.
Any advise? Thanks.
The code is as simple as the followings.
$('.test').click(function(){
FB.ui({
method: 'share',
link: 'http://MY DOMAIN/img/THE GIF.gif',
caption: 'An example caption',
href: 'http://MY DOMAIN/img/THE GIF.gif',
}, function(response){});
});
Related
I'm trying to share a dynamic content to Facebook and below is my code, everything works fine but the image is not taking, no idea what is the issue is. Below is my code
FB.ui({
method: 'feed',
link: fb_share_url,
picture: picture,
quote: title,
});
For fetching images i prefer Piccaso Open source library
Using Facebook's now deprecated feed dialog, I used to be able to pass in an actions parameter containing a link to an external URL.
For example:
FB.ui({
method: 'feed',
href: 'http://www.example.com',
actions: [{
name: 'Learn More',
link: 'http://www.example.com/learn'
}]
});
I now want to use the share dialog, and am using open graph meta properties to customize the content being shared. I've been reading about the open graph action types, but haven't found anything about how to add an action link to the share dialog that simply links to an external page like the example above does. Does anyone know how I could do this? Thanks!
Do the Open Graph meta tags override the corresponding parameter values passed in FB.ui?
I have a page where I have an og:description tag (I want it to be used by the like button). I have a share button which triggers a share dialog using FB.ui.
Coffeescript Code:
FB.ui({
method: 'feed',
link: Selfstarter.baseUrl(),
caption: caption,
name: 'Healthfundit',
description: 'Some Description',
actions: [{name:'Help Fund It!', link: Selfstarter.baseUrl() + "/preorder/checkout" }]
source: source
}, (response) ->);
When I test the share button, the description that is displayed is the one I specified in the og:description tag.
Do the Open Graph meta tags override the corresponding parameter values passed in FB.ui?
No, the other way around.
If that’s not working for you, then most likely there’s an error in your code. [As we figured out, that was it.]
Does anyone know if a user generated HTML5 Canvas could be attached to a Facebook 'Like' action and shared on a Facebook wall?
I guess the canvas would have to be rendered to an <img> tag and the id of the tag specified in the og:image metadata?
You have two options as I see it.
(1) Use the Like Button and in it put a dynamic url which generates the og tags for the configuration the user has chosen.
In the 2nd step of the like button tutorial it generates the og tags for you so you can see what's needed, then just make sure that your server generates those according to what the user configured.
You'll have to make a request from your page to the server when the user finished his configuration so that this will be possible.
(2) Use the Feed Dialog that comes with the js sdk.
Using that you can specify all of the story fields, for example:
var obj = {
method: "feed",
picture: "URL_FOR_THE_CONFIGURED_BIKES_PIC",
name: "My custom bikes!",
caption: "I just finished building a new pair of bikes",
description: "My configuration: ....."
};
FB.ui(obj, function(response) {
console.log(response);
});
It is of course possible to mix both options into a third, if you have a specific url per configuration then you can simply:
FB.ui({
method: "feed",
link: "URL_FOR_THE_USER_CONFIGURATION"
}, function(response) {
console.log(response);
});
And then facebook will extract the data from the og tags in that link.
I want to create a post to a user's wall via my facebook connect mobile app. I looked on the FB developer's website and only found this to post through mobile:
http://www.facebook.com/dialog/feed?
client_id=YOUR_APP_ID&redirect_uri=YOUR_URL&display=touch
along with this statement The current version of the JavaScript SDK does not yet supporting automatically selecting the correct dialog for the user's device. We expect to add this capability shortly.
Has this been fixed yet? I have been trying to workaround using the normal method:
//Post on user's wall
FB.ui(
{
method: 'feed',
name: 'MyApp',
link: 'myURL',
picture: 'http://fbrell.com/f8.jpg',
caption: caption,
description: message,
message: ''
},
function (response) {
});
But it is slow and doesn't work the way I want it to.
Suggestions?
As of now no the cannot. You can still do auto publish posts though.