Post on Facebook Wall - facebook

It seems that the way of posting to your wall or friends wall has change. Can anyone understand how you can do it?

Changed since when? Facebook seems to change things every quarter. Some of the latest ways are using the Graph API:
http://developers.facebook.com/docs/reference/dialogs/feed/
or using the javascript SDK and the FB.ui method:
http://developers.facebook.com/docs/reference/javascript/FB.ui/
FB.ui({
method:'feed', to:1234567890123, name:'Check this out', link:'http://link.com',
description:'very funny, a must see'
}, function(response) {
//log response
}
)

You just go to your friend's page and use the normal 'Share / Write something' functionality - it will appear on your friend's wall.

Related

Facebook API. Attend to the event

I would like to make possibility for attending to event in Facebook feed view in my app. Is it possible by POST-request of Graph API?
IF it´s still possible, then by just doing a POST request to the attending endpoint. For example, with the JS SDK:
FB.api('/[event-id]/attending', 'POST', function(response){
console.log(response)
});
Afaik it was possible earlier, and you would need the rsvp_event permission for this.
Edit: I just tried it in the API Explorer, it definitely works: https://developers.facebook.com/tools/explorer/?method=POST&path=[event-id]%2Fattending&version=v2.5 (of course you need to replace the event ID)

OpenGraph post to news feed layout

I post an action to a Facebook news feed from a website. I am getting a look that is not quite what I want to have:
I want it to be larger, like this one:
I am using JS SDK for posting, code comes from App, for testing-only in a dev-env it is currently following: (assuming user is authorized with correct permissions)
FB.api(
'me/aeegens:win',
'post',
{
thropy: "http://samples.ogp.me/444294502324595"
},
function(response) {
console.log(response);
}
};
I tried to look for solution in Facebook API documentation, but could not find it.
Answer is simple, one needs to have a bigger image.

Posting to user's wall - difference between wall and feed?

I've set up Facebook login on my site, and have done a couple of test wall posts when certain user actions occur. I tested it on my FB account, and the posts turned up on my wall (good).
Immediately I had a couple of friends email saying, 'how do I turn these notifications off, they're filling up my feed'.
I'm guessing this isn't a good way to promote my app - it'll piss people off. Unless I have an option at the time of the app action for the user to say 'yes, post to my wall.'
I notice that my posts were also coming up in the activity ticker (on the right of your profile page), and that a lot of game apps post player activity there - is it possible to just post to that and not to the wall? If so, what do I code instead of "/me/feed", "post"?
Thanks
In the activity ticker it is actually the updates from the Users or pages or apps are displayed which actually come from , if you go back to their wall and see, their respective wall.
Feeds are usually the updates and those also come from wall.
One thing which you can do is when providing permission to your app you can make it visible to you only(Only me option) so that none of your friends gets it in his/her feed.
Otherwise there is no other way for now.
Instead of directly making a post through graph API use Fb.ui feed method. This will open a popup dialog which user can accept to be published on wall or cancel:
FB.ui(
{
method: 'feed',
name: 'Facebook Dialogs',
link: 'https://developers.facebook.com/docs/reference/dialogs/',
picture: 'http://fbrell.com/f8.jpg',
caption: 'Reference Documentation',
description: 'Dialogs provide a simple, consistent interface for applications to interface with users.'
},
function(response) {
if (response && response.post_id) {
alert('Post was published.');
} else {
alert('Post was not published.');
}
}
);
note:all links here should point to domain specified by you in canvas url
A better approach would be to use open graph actions instead a just posting a story on wall. Open graph actions are seen in Activity section of your timeline. The stories are small hence does not seem like spamming user wall. If the number of posts is high it is aggregated/clubbed together.

Facebook App Coding: Friend selector formular without FBML?

Hey guys,
as far as I know are FBML Codes not working anymore on Facebook unfortunately..
So does anybody< here has an idea on how to use the friend selector formular which could be used easily via FBML code in our facebook applications??
would be great if someone could help (not only me ;) ) out!
thanks!
You may want to check out the requests dialog reference page. It looks like it may be what you need.
Do you mean the Invite Friends UI overlay? You're probably not going to find an FBML solution since Facebook are retiring it. This is how to do it using the Javascript API:
FB.ui({ method: 'apprequests', message: 'This is my message'});

Facebook Graph API - Javascript SDK

How can I post to a user's wall using Javascript SDK?
Facebook strongly advises against directly posting to user's feed without direct consent of each specific post, you should really try using the javascript SDK's FB.ui functionality:
function PostToWall(msg) {
FB.ui(
{
method: 'feed',
name: 'I'm using this great app and it says that '"+msg"'",
link: 'http://apps.facebook.com/link-to-app,
picture: 'http://yourdomain.com/images/facebook-logo.png',
caption: 'Small caption that will appear in grey'
}
);
}
Read more about it here