Is it possible to post a photo to the wall (and not to the album created for the application)?
I thought about iterating through all of the user's albums and posting to the one called "Wall Photos", but wonder if there is a more elegant way?
Thanks
You can use the FB.ui method from the Javascript SDK. If you provide the URL for the image as the link and picture parameter. This will create a wall post for the active user that has an image, a title, caption, description, etc. And the image and title will link to whatever URL you have provided.
FB.ui({
method: 'feed',
name: 'Name Goes Here',
link: 'link to the image',
picture: 'link to the image',
caption: 'caption goes here',
description: 'description goes here',
properties: ''
},
function(response) {
//You can check the response variable to see if the post has been created
}
);
Albums have a type that you can see when requesting /albums in the Graph API, so instead of checking for name you can check for this.
Eventually used the method listed here https://developers.facebook.com/blog/post/526/ .
First uploaded the photo and then linked to it using object_attachment.
Related
so I implemented Facebook send dialog in my Facebook app, but the problem is that it always displays server name and some random thumbnail. I put everything as it shown in Facebook documentation but nothing works.
This is my code:
FB.ui({
method: 'send',
name: 'myName',
picture: 'image/path',
link: 'https://apps.facebook.com/APP_ID/',
});
You should read https://developers.facebook.com/docs/sharing/reference/send-dialog according to that page the parameters you can pass in are: app_id, redirect_uri, display, to, link. Neither name or picture are listed.
I've been using the Facebook API for quite a long time, I've managed to post to feed pictures, videos, and links, but my client wants to post a Spotify track through a Facebook App.
For instance, to share this track: http://open.spotify.com/track/5yEPxDjbbzUzyauGtnmVEC
When I copy this into Facebook's post input, it loads the correct song name and cover. However, if I use the FB.ui API call, it just doesn't share anything around.
var data = {
method: 'feed',
link: MY_FB_TAB,
name: name,
caption: caption,
description: description,
message: '',
picture: 'https://embed.spotify.com/oembed/?url=spotify:track:5yEPxDjbbzUzyauGtnmVEC',
source: 'http://open.spotify.com/track/5yEPxDjbbzUzyauGtnmVEC'
}
FB.ui(data);
Isn't just a way to share a track using the FB.ui dialogs?
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.]
I have a facebook app. It allows users to post some data through the app. I have used the following code:
$facebook->api("/me/feed", 'post',
array('message'=> 'Hello',
'link'=> 'The link goes here',
'picture'=> 'URL to picture',
'name'=> 'Something',
'caption'=> 'Some Caption',
'description'=> 'Comment',));
The above piece of code is posting the message to User timeline. However, it does not appear on the home screen (The screen that appears as soon as a user logs in).
Please let me know if I have missed some necessary configuration. Thanks.
You cannot force a story onto the Newsfeed of friends. Facebook's algorithms will determine if the post is relevant to each individual friend, and will insert that post into his or her newsfeed if it is. There's absolutely nothing you can do about it.
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.