How to automatically post to facebook wall? - facebook

I am creating a meteor blog and I want to make my blog post automatically posted to my Facebook wall. Moreover i will make this blog a multi user blog so any user who posts on this blog, their post will also be posted to their respective Facebook wall. I don't need specific meteor way of doing this but i would like to know how this can be achieved in general. If there are multiple ways, please tell me that too.

Todos
User needs to login to facebook or any such services from your app.
Your app requires approval(permissions) to post on user's behalf.
You expect your app to be database driven.
There is a meteor way to achieve these workflow. Refer this doc which showcase meteor's in-built service,
Meteor.loginWith<ExternalService>([options], [callback])
All necessary data like access token, email will be saved in server i.e. mongodb database.
Once user successfully logged in, you can publish post from your client. You may like to go through this javascript quickstart for Facebook SDK Graph API.

Related

Facebook Graph API pull a Posts basic data like Instagram Basic API

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.

Tag persons in Facebook page post

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.

How can you trace what a user read on your blog through the Facebook API?

I have a blog. I like people to login to my website and mark which articles they have read, completely through the Facebook API. Similar in the way how you can currently like (and unlike) a post on Facebook, I like users to be able to read (and unread) a post on my blog.
Now I completed the following steps:
Created an app.
Users are able to login on my site.
I created an action (read) and an object (article).
People are able to press the 'read' button and it's being shared on their timeline using:
FB.api('/me/[MY_NAMESPACE]:read?article=[URL_TO_ARTICLE]');
When a user, logs in to my website on a different computer, how am I able to trace which articles it has read?
Or is the only way you can accomplish this by storing this information on your own server using the user.id and the article id? I dislike this thought.
You should be able to do a call to the same endpoint to get a list of existing 'read' actions for the current user. Example:
FB.api('/me[MY_NAMESPACE]:read', function(response){
//Do stuff with array of read actions here
});

Check whether user of non-facebook app likes/shares particular URL on FB

I'd like to know if there is a possibility to check (using Graph API or any other way) whether given user likes / shares a specific link. Probably I'll have this user's facebook ID or facebook login, but my site is non-Facebook application. Actually it's Dot Net Nuke portal (target: .NET with MS SQL Server) with part of it being avaliable as Facebook app, but certainly not greater part of it, so the solution should be out of Facebook Connect, although it's not a showstopper if it's necessary.
We'll be giving points to users who share/like most of links that we serve in our portal and such possibility would be a great help to make a ranking.
Another option we consider is making some kind of "wrapper" or proxy for FB like / share buttons which will at first save some data in our database (probably - this user clicked on like for this link) and then go on with standard FB like / share route. Did anybody of You tried such solution?
If You have any other suggestion on the subject, please, post them, we'll be really thankful.
It is possible to know if a user has LIKED a site or not. You can get all user's likes with Graph API (you need user_likes permission). Take a look at the docs: http://developers.facebook.com/docs/reference/api/user/
I'm not sure if you can know if he has shared your site, but you could try by parsing his wall with the read_stream permission and then look for your site name/URL post by post.
For just general liking of items on your site, you can use a Facebook Social Plugin. However, you won't be able to associate (or really even access) user activity with users on your site without integrating Facebook Connect and creating a Facebook application for your site. At that point you can design with greater control all the possible user activity and interleave with your facebook calls other calls that affect users' accounts on your site.

I want to use facebook connect in my website to register, login and comment on news articles or posts made by other users

I would like to implement the following things in my website. I have done some extensive search over the internet but couldnt find and specific examples on how to implement them
I am developing this site in php using a mvc framework
Would like to have facebook registration on my website - users who have an account in facebook will get an option to use the details to register in my site, using their authentication I would pull the relavant details from their account and create a new account for them in my website. I would like to use facebook register fbml/fbjs in this case
Would like to have facebook login used to login into my site. How to use the sessions is what I would like to know?
I would like to make posts to the facebook-wall of the users registered in my site. Also if possible sent messages to them through my code whenever a new post is made to my site.
Thanks for your help.
For login and registration, you can check out http://developers.facebook.com/docs/guides/web/.
This one is for wall posts and you should be able to implement it in any language. It is given step by step.
http://thinkdiff.net/facebook/graph-api-iframe-base-facebook-application-development/