I stumbled into a facebook post where when user click the like button, or share the post or post a comment, a facebook page bot will automatically message the user. Here is the exact post:
https://www.facebook.com/ninjateam.org/posts/1799394500352455
I'm trying to look into the facebook developers API documentation on how to do those kind of functionality but always failed. Can you point me to the correct path where to start or what resource is used in those kind or post?
Related
We are developing a mobile app that if share a FB post link to it, like you can share on WhatsApp, we want to be able to read the title or summary or start of that FB post, and redirect our App to the corresponding area.
So it works on Instagram using: https://developers.facebook.com/docs/instagram-basic-display-api/
Where give the post ID and it pulls in the caption text etc.
So works for IG and some other socials for anonymous users.
But for FB links, it mostly shows us the login page, in most cases (sometimes it worked on localhost maybe if logged-in - but could not recreate on server environments).
So cannot pull in any info about the post have shared using a direct FB share URL or maybe via some method on FB Graph Api, we could not see an easy way.
Does anyone know a generic method that anyone sharing a post to an app, or even just being able to see the title or summary of a FB post using the default share link, so we can direct our App to the right page.
So essentially using a FB post share link, we want to be able to read some basic data of that Post, whether logged in or not,
and happy to do this via Graph API or FB App or any other ways.
Again in summary - need to Get some user defined parameters or text or ideally hashtags from the post just using the share link of any FB Post/Page.
Any ideas or help appreciated.
I've written a Facebook web application, which is able to post links to the app page feed (as the page) by requesting the page token and doing a post request to the /PAGE_ID Graph REST endpoint. So far, so good, but I'd like to tag the links with their authors as well. When I add the tags parameter to this request with a value of my user id (I am an admin of the page), this works fine. But when I enter another user id (even one that likes the app page), no tagging is done. Does anyone have any experience with this? Some blog post suggest this is not possible using the Graph API, even though this is possible when done manually.
Thanks!
If I understand correctly what you want to do, it is no longer possible with the new version of the Facebook's API (v.2.0).
Refer to this page for more informations.
Twitter has a very simple API for encouraging users to tweet something based on web intents. See here.
Does Facebook have an equivalent? If so, what is it? What I basically need is to let users be able to post a message from my website to either their timeline or a friend's timeline, with facebook itself handling the login authentication stuff. So the use cases would be: 1) user clicks the post link, happens to be logged into FB on his browser, and FB takes them to their timeline with the text already pasted into their status update box; or 2) same as 1, but with an intermediary log in step for a user who didn't happen to be logged in before.
If anyone has any ideas, please let me know!
Thanks.
Facebook comments plugin - as far as I understand, if I have put the facebook comments plugin on a post web page, and the permalink of the post being commented on matches the base URL, then comments are stored via facebook using my post permalink.
Lets say if I post the permalink onto my facebook page wall (which I am the admin of), the open graph tags come into play, all the relavant data is pulled in, fb:admins, fb:app etc.
But is it possible to connect my facebook page (using my facebook page ID) to that permalink - so that comments posted on the page using comment plugin, connect/link with the post comments on my facebook page wall?
Thanks
This is currently not possible. We've implemented custom solution using Facebook Application and Facebook Javascript SDK on the website itself. You need to query the comments table of a specific Page post via FQL using your app access token from your server to retrieve all comments and render them on the page.
Then you need to provide user with several entry points for several states in order to enable posting for them. You need to solve four cases:
User doesn't like the page and didn't authorize your app
User doesn't like the page and authorized your app
User likes the page and didn't authorize your app
User likes the page and authorized your app
User needs to like your page and authorize your app with publish_stream permission in order to be able to comment on your page posts via your website. Of course you need to maintain reference between posts on your page and posts on your website.
The website where we did this a few years ago is BIGGBOSS click on "Komentáře" and find the same post on Facebook with the same comments.
As far as I understand your question its not possible to connect the comments from the commentbox, integrated in your non-facebook page (e.g a blog of yours), to the comments which are posted to a post on your fanpage.
The only solution would be to build an custom commentbox with the open-graph and publish the comments to the fanpagepost and additionally extract the comments out of the fanpage to display them on your blog.
But this requires accepting permission dialog before people are able to comment on your blog which would probably decrease the comments made. You would lose the benefit of the built-in commentbox.
I'm working on a plugin for a Wordpress blog that posts a link to every article published to a Facebook Page associated with the blog.
I'm using the Graph API and I have authenticated myself, for the time being, via OAuth.
I can successfully post a message to the page using curl via a POST request to https://graph.facebook.com/mypageid/feed with e.g. message = "This is a test" and it published the message.
The problem is that the message is "from" my user account. I'm an admin on this test page, and when I go to Facebook and post an update from the web, the link comes "from" my page. That's how I'd like this to be set up, because it looks silly if all the shared links are coming from a user account.
Is there a way to authenticate myself as a page? Or is there an alternate way to POST to a page feed that doesn't end up being interpreted as a comment from a user?
Thanks for any thoughts or suggestions.
To post as the Page, you need to get an access token for the page by getting an access token for an admin of the Page with the "manage_pages" and "publish_stream" permissions. Then, using that access token, hit https://graph.facebook.com/me/accounts?access_token=THE_ACCESS_TOKEN. You'll get a JSON output of all the Pages that user admins and in there you'll see an access token for each Page. If you use one of those access tokens to POST your message, you will be doing so as the Page. The process is outlined in the documentation here (sorry, it's kind of buried).
Ah, it's a bug.
you need to use enable_profile_selector
http://developers.facebook.com/docs/reference/javascript/FB.login
Please have a look at the comments by "Nam Thai" on this thread: http://www.takwing.idv.hk/tech/fb_dev/faq/graphapi/graph_27.html. This solved the problem for me.