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

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/

Related

Facebook Messenger Platform: how to get user specific information?

I'm trying the recent released Facebook Messenger Platform and so far so good. Everything worked well and I was able to create a echo bot.
But I'm wondering how I could identify this user that started chatting in my page. For example, when a user started chatting I get a PID user (page specific user id).
Making the follow request to Facebook Graph API:
GET https://graph.facebook.com/v2.6/{PAGE_SPECIFIC_USER_ID}
I discovered that I can just ask for the following fields: first_name,last_name and profile_pic.
So my question is, how could I discover if this user is a current customer of my business page? Is there another way of querying more information (like e-mail and real facebook user id)?
Facebook has updated the messenger platform API (2016-07-01) and introduced a new feature called Account Linking. This can be used to identify a user who has created an account on your website via Facebook Login and you can link the two accounts. Facebook login has its own set of permissions which can be used to get a lot more information via Facebook graph API. You can find the complete list here.
Currently, there's no way to do this. The best way would be to prompt the user to enter their information in chat or give them a link to a mobile login page or some other way of linking their account to the chat.
Messenger Platform 2.0 introduce "ID Matching API" ,that will solve the problem.
https://developers.facebook.com/docs/messenger-platform/connecting-accounts
you can retreive a user information like below using fbmq library https://github.com/conbus/fbmq
# this method will occur when a message received from user
#page.handle_message
def message_handler(event):
user_profile = page.get_user_profile(event.sender_id)
print(user_profile) #first_name, last_name, profile_pic, gender ...

Questions regarding the review process for my code using Facebook API

When I'm getting ready to move my app that I created (in order to use the Facebook API), the process asks for things such as App Name, icon, etc. I only created an app in order to use the APIs. I'm calling the app from my website and the app will not be public facing outside of my website. What should I put for these questions? Is this even the correct way to use the APIs to write to a company page? I created the Facebook app because that's the only way I knew to be able to use the Facebook APIs. If I don't need an app and can use APIs in some other way can someone please direct me to an example?
What I'm doing is allowing a user on our website to post their Testimonial comments to our Facebook company page's Visitor Posts. They are presented with the Facebook login dialog and then upon successful login the testimonial is written to the company page and the user is returned to our website.

Facebook: How to post on own page using graph api without login

I own a blog like website, and as part of promotions I have a corresponding facebook page. My website contents are dynamic & when it gets updated(through a bot), I want the facebook page also to be updated by an automated post/publish from the bot which shows up the updates to the page viewers.
I could create a facebook page, and my bot programme which updates the web content is also able to publish the content on my facebook page using graph apis. But the posts are not publicly visible(Visible to only me/admin).
I could learn that it could be because my app through which my bot program is publishing to my facebook page is not public.
App->Status & Review, Status (Tab)
(Do you want to make this app and all its live features available to the general public?).
To make the app public, there is a review process which checks the facebook login button used in the website but my posts are through a backend bot and not through user action. My website is like a blog without user authentication so can't think of adding a login there.
Is it possible without having user login on the page? Also, If I post using twitter apis and link/configure my twitter account to my facebook page, it works.I guess this is not a new problem and many brands have automated it already, so need to understand how.
Am I missing something?
Apologies: I have checked previous posts on the same topic, but couldn't find relevant answers for the current Facebook version & policies.
Without the Login Review process, your posts can not be visible to the public.
To get it working, just send your page management tool (with the login dialog) for the review. Once they review it and accepted, you may change the flow a bit eg: skip the login part and allow auto posting.

Facebook login in classic ASP website

I have a Classic ASP message board (http://yankeedesi.com) where users are required to sign up for posting messages. I want to incorporate an additional functionality to login via facebook. I searched on Google but could not find any good examples for implementing this in Classic ASP. Can anyone direct me to a good source of how to do this?
I don't need any advanced functionality, just the basic login feature. My My user registration currently captures the First Name, Last Name, Email address, Country State and City. Is it possible to pull these information from the facebook profile once the user signs in through facebook and create their login in my database?
I guess this should be possible if you manually implement a so-called "Login Flow". Have a look at the docs at
https://developers.facebook.com/docs/facebook-login/manually-build-a-login-flow/v2.0
There you can find a step-by-step guide on how to implement OAuth with Facebook.

Social Media Linking

I've done a little searching and was wondering if there is a way to link a users account in our web app with their social media accounts they choose to link (facebook, twitter, etc). i.e. when they log into our web app they are auto logged into facebook, twitter, etc?
I see facebook has an api to login to our web app using their facebook book account but I want it to work the other way around, I want them logged into facebook when they log into their account via our web app.
Thanks,
Ryan
It is definitely possible-from your question I assume you would like to pull data and make actions on behalf of a user? If so, you will need the offline_access permission as well as all the other permissions you will need (check out the list here to see exactly which ones you require). Then, you can trigger a script on your server that tell facebook as soon as the user is logged in to your site, to log in your application as the user as well.
NOTE: You might be going about this in the wrong way. I would advise that you specify a bit more details on what exactly you need the user to be logged in for, and I can (probably) provide you with a decent answer.
EDIT: In response to your question in the comment, Ryan, here is my answer:
You need to divide this problem into 2 different situations-one: your company wants you to write all the code from scratch and don't use what facebook has to offer, in which case you should create a custom login script that enables your users to use their facebook account as the Actual user account in your web app. This is the best solution in my opinion, and is supported by the ever-so-awesome Jeff Atwood. Here's a link to how to do just this, and a tutorial about this also.
Or your company is comfortable with using Facebook's Social Plugins.
Then you should focus on Like Button & Comments : These social plugins are the best way to enable people to create social experiences if they're already logged in.