简体   繁体   中英

Facebook website integration - what's actually possible in terms of custom website features

I know there are a lot of questions out there for facebook integration, and a lot can be read of off developers.facebook.com - which I did. But I'm missing some clear and precise answers as to what I can actually do in terms of my project.

So I know I can connect my website with a facebook account, and as far as I can read it's possible to "attach" a facebook account to a user in my own custom user-database. Correct?

I'm looking primarily to be able to do this, but not necessarily require the user to have a facebook account to use my app. And as far as I've understood, this is possible too.

To provide context I'm building a specialized photo sharing app.

Where it gets iffy for me, is if I choose to have the ability to comment on a picture on my app. I know there is the social plugin "Comments" for facebook, but how exactly would this work? It would store the comments in facebook would it not? And if a user with no facebook account registers at my site, he won't be able to use the comment feature? Can he even see the comments? Is it at all possible 'hook up' facebook comments to a custom comment-feature on my site? So the user without facebook can still comment?

And this whole integration - would it require the user to 'install' a facebook app (mine) on facebook?

"So I know I can connect my website with a facebook account, and as far as I can read it's possible to "attach" a facebook account to a user in my own custom user-database. Correct?"

Correct, you use the userid that Facebook provides to identify the user.

"I'm looking primarily to be able to do this, but not necessarily require the user to have a facebook account to use my app. And as far as I've understood, this is possible too."

Yes, you just need to built the extra functionality into your app (allow for registrations coming from FB or a regular form from your website). You might want to have a look at Facebook's registration plugin .

"The plugin also allows users who do not have a Facebook account, or do not wish to sign up for your site using Facebook to use the same form as those who are connecting with Facebook. This eliminates the need to provide two separate login experiences."

"I know there is the social plugin "Comments" for facebook, but how exactly would this work? It would store the comments in facebook would it not?"

Yes, it stores them on FB, but you can access them and replicate them into your database via the Graph API. Read this for details .

"And if a user with no facebook account registers at my site, he won't be able to use the comment feature? Can he even see the comments? Is it at all possible 'hook up' facebook comments to a custom comment-feature on my site? So the user without facebook can still comment?"

The comments feature will not be tied to your site's registration, since it does a separate auth check. Unfortunately, the comment plugin does not support anonymous comments, or pushing comments into it from another app, so a user will have to have an account in Facebook, Yahoo, AOL or Hotmail to post a comment. But all users will be able to see the comments, regardless of account status (you can control that from your code of course - eg hide the comment plugin for a user group).

Besides FB's plugin you can have a look at other solutions like Disqus (http://disqus.com/), which supports multiple login sources AND allows for anonymous comments if you want.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM