hybridauth facebook and like gating - facebook

I'm setting the hybridauth to get it working with my login. All the standard things are working but I would like to use this library to check if a user has liked my facebook page. How can I do that using this library?
Is there any one can point me in the right direction with some example?
Thank you

Hybrid_Auth API Doc available you can check the all options provided by hybrid auth, this can be fetch providing "scope" => 'user_likes' in array. facebook hydrid auth example explained here
You can get all the details information of facebook Permissions details are available here
facebook provides access to the list of all Facebook Pages and Open Graph objects that a person has liked. If your app requests this permission Facebook will have to review how your app uses it.

Related

Restrict facebook app from accessing user's friends list

I am using facebook to login to my website. The website does not need any information about the facebook user's friends' list. I am interested only in the user's general information.
https://developers.facebook.com/docs/reference/login/public-profile-and-friend-list/ shows the friend list also as the minimum information shared by Facebook.
Hence wanted to check if there is any way to restrict the user friend list information from being passed on from facebook to my application?
No, when a user authorize an application the minimum data shared is it's basic information and friend list.
Unfortunately you cannot change this.
Official documentation:
When someone connects with an app using Facebook Login, the app can
access their public profile and friend list, the pieces of information
that are visible to everyone. Each other piece of information that
someone adds to their Facebook profile is secured behind permissions.
Source: Facebook

How to post on friend's wall using facebook API without logging in to facebook?

After latest Facebook API changes, is there any way to post on friend's wall, using authenticated access_token?
I have tried using Feed Dialog, but redirects to facebook login page. I want to bypass the login step.
Unfortunately not. From the Facebook API documentation on publishing:
"Note: If you are posting to a friend's timeline or wall, you must use the Feed Dialog."
Full details: https://developers.facebook.com/docs/reference/api/publishing/
No,You Cant
Currently, Facebook allows to post by two ways:
Using FacebookAPI
Using Facebook SDK (depends on your requirement)
And in both these methods its must that you should be an authorised user to perform the action, authentication is a must.So you can't do this without a login.
NB: As per the Facebook Developer docs, graph API no longer works .(But I would like to add on that many of the iOS apps which used this service are still functioning well). So, I prefer to use Facebook SDK.
Hope my answer is clear.

Facebook Registration plugin ask for permissions to Post on timeline

I am using the FB registration plugin to register users (Since I want a unique mysite_username for each user) But this does not allow me to access permissions to post on the users timeline like the FB login button.
I would like to know some standard technique to "Connect" my users with their facebook timeline so that they can choose to post the achievements they obtain on my website onto their facebook timeline!
Something like the FBML Promt permissions but Its getting deprecated so I'm NOT really sure about using that. But smething like that would definitely help!!
Glad to accept the most suitable answer!
Adit
Just use FB.login from the JavaScript SDK, and specify the permissions you want in the scope parameter.

Post status update to Page Wall

I'am really new to all this Facebook development, and I wanted to integrate Facebook within my personal website.
I am now trying to test if what I want is possible.
I want to post a status from my server, via php/js to my Page in Facebook.
How can I do so?
B.W.
I saw that there is this FBJS function called "Facebook.streamPublish"
But I don't know how to integrate it.
Is there any possible way to do so?
Can you give me an example?
-Secondly, what is an access token?
You get an access_token after facebook authenticates you. You will need this access_token for all subsequent API calls. You can find the details here:
http://developers.facebook.com/docs/authentication/
You can use graph API for publishing on the wall and doing other allowed actions. Details of publishing api can be found here:
http://developers.facebook.com/docs/reference/api/post/
But do have a look on the facebook policy, because publishing automatically to a wall is considered violation.
http://developers.facebook.com/policy/

Facebook Graph API

Can I use the Facebook Graph API without the creation of my Facebook Application? As I understand it, for each operation I need to use the OAuth key. And I can only get user OAuth key if they authorize my Facebook application. Am I right?
I need to get user feed, and post to it.
Facebook Graph Api needs your APP ID which you can only get from your Facebook application. So i think its not possible to post data on facebook without having Application ID.
You can use this tool to dynamically generate an access_token for testing: https://developers.facebook.com/tools/explorer/
Also, check out RapidAPI here. I've specifically linked you to the FacebookGraphAPI block. Here you can instantaneously connect to numerous Facebook endpoints. The platform will generate a code snippet that you can directly insert into your code.
Depends on what you want to do, for most tasks you have to have an app id... but If you want to get the amount of shares for a certain page, for example, you can do it with no app ID.
I think there is FBML (facebooks mark up language) which you can embed on your site which can handle some basic tasks like commenting or liking.
No, You can't do that as Facebook Graph API needs access token which u can get only by authorising your logged-in user by your (Created) App in Facebook.