How to post in Facebook with #mention ability using stream.publish? - facebook

I would like to include inline links friends within the message of a stream.publish call. Here is example pyFacebook code:
Code:
facebook.request_extended_permission("publish_stream")
facebook.stream.publish("#John Doe is cool")
Is there a way to include markup in the message to do this?
src: http://forum.developers.facebook.net/viewtopic.php?pid=339920

Facebook had included a way to do this notifications, about 2 years ago but unfortunately, the functionality hasn't made it's way into the stream publishing methods. So, for right now, it's not possible to tag a user's friends in a post that you are composing via your application. ::sad trombone:: heh

Related

Facebook API post in event - external website

So, I've created a wedding event on my FB account. Now on my website (static) I would like to have a form (maybe embedded or something from FB) that a visitor could leave a message on it for greetings. That message would instantly post on the event I have created.
I hope you understand what I would like to achieve.
Is it now possible to do that? Or Is there an API for this? comment mirroring seems not applicable for events.
If it's not possible to achieve, is there an alternative that is easy to integrate on my site and of course the message will post on FB.
There are tons of APIs for Facebook, all listed on the Facebook developers documentation page: https://developers.facebook.com/docs/
But I think what you're looking for is something like this:
https://developers.facebook.com/docs/javascript/examples
Trigger a Share dialog
The Share Dialog allows someone using a page to post a link to their timeline, or create an Open Graph story. Dialogs displayed using the JavaScript SDK are automatically formatted for the context in which they are loaded - mobile web, or desktop web.
Let's make an API call to publish a message. Add the code into the response function of the FB.login call you added above:
FB.login(function(){
// Note: The call will only work if you accept the permission request
FB.api('/me/feed', 'post', {message: 'Hello, world!'});
}, {scope: 'publish_actions'});
Try the script. A status message will be posted to your timeline: Hello, world!

Posting with facebook api a message containing friend's names as links

I want to do a simple thing yet it seems none of the FB api options (Graph/others) seem to be able to solve it.
Say "Johny Brown" is my friend and I want to include his name in a wall post. What I can do is type #Johny Brown then facebook shows a nice dropdown from which I can select his name.
However the same behavior cannot be mimicked using Facebook API.
Any tips will be greatly appreciated. I tried "#" before name, using full url, using "Name" etc. None of them work.
yup you're correct. in the new graph api facebook simply removed this feature (possibly due to too much spamming).

wall posts and fb:multi-friend-selector

Firstly i know that the documentation provided by Facebook says that fb:multi-friend-selector can be used in pair with fb:request-form and that it could only sends inviations or requests.
I have more specific need and that is not only to make invitations/requests but also along with the previous to post something on selected friends walls.
I've tried everything but i cant take the id's selected from the fb:multi-friend-selector, so i'm unable to make this posts.
The doucmentation for fb:multi-friend-selector says: This interface includes a series of which are included for selected users in the form that gets submitted to your action URL.
Is it somehow possible to catch this id's?
I'm working on my app in C# .net.
I read in some of the previous posts that is treating problematics similar to mine that is impossible to do this, but i found application that works perfectly in way that i want to make my application.
Thanks in advance,
Ivan
You can access the selected friend's id in the page that you are providing in "action" of fb:request-form.I am working with PHP so i am able to get those selected friend's id as $_REQUEST['ids'].So try some equivalent methods in c# for this.And if you get the friend's id you can publish to their wall.

How to send a Facebook notification through their API

I asked this on the Facebook Developers Forum with no responses.. How do I send notifications to users so they show up in the Notifications globe icon tab on the top left of a user's Facebook page? Some applications I use have their notifications show up there, but I don't see how that mechanism works in Facebook's API docs. Neither are there any permissions which seem to be required to send users notifications.
I know this is an old post - but someone might stumble on it as I did, and find it useful:
The notifications area in FB is updated by sending Requests which can be sent by using FB dialogs. The JS SDK provides the FB.ui() method to show dialogs for posting to stream, or sending a request.
More Info on FB:
http://developers.facebook.com/docs/reference/dialogs/requests/
http://developers.facebook.com/docs/reference/javascript/FB.ui/
Apparently facebook activate again the possibility to send notifications :
https://developers.facebook.com/docs/app_notifications/#ux
POST /{recipient_userid}/notifications?access_token= … &template= … &href= …
You need to post it to -
https://graph.facebook.com/
for example -
https://graph.facebook.com/{recipient_userid}/notifications? access_token= ... href= ... & template= ...
Update : Please check oneamongu's answer below. In my old answer I was referring to the custom notifications. oneamongu defined the requests structure very well below.
Old answer : Facebook Notifications were outdated by facebook about 1 year ago. Instead, you can post on a user's wall if you wanna inform him.
because when I run the query: {recipient_userid}/notifications? access_token= ... href= ... & template= ...
it's work only in facebook WEB?
I see the notification on the web facebook, but do not see it on facebook Mobile?

is it possible to add a a-href link to a user in a facebook wall post?

when you post a message using the facebookSDK, i was wondering if it is possible to add a link to another user profile?.
Something like:
Carl has left a message to Julian, Ana using the "Send Message" application
where Carl, Julian and Ana are links to their respective profile pages.
No, unfortunately you cannot tag people (friends) in that way using the api. I searched for ever to find a way for doing it, but it cannot be done.
Yes.I too tried the same . But facebook allows only plaintext to be posted as message to the wall.
Its better to drop the idea
Facebook now allows to tag poeple inside actions : https://developers.facebook.com/docs/opengraph/actions/#taggingpeople