I have a fan gate/ reveal page on Facebook. When the user likes the page, the user goes to a second page and the user is able to download a PDF file. I want to generate the content of the PDF file dynamically so that it includes the username of the user/fan. Is that possible?
To get the users name you would need to have them authenticate with your application - liking a page does not give the users info to the liked page.
Related
Is there a way to redirect to other page and automatically log into that page?
So it's like I make django webpage with login and create link to facebook. When user clicks to facebook link, it should automatically login to his facebook page. Of course, I will have his facebook username and password on db I used to create the website.
Is this possible? Basically, I am trying to create interface page on django with link to several different webpage and make user access to his page by simply logon to this interface page alone.
I suggest that you have a look at the Django-allauth, which is an Integrated set of Django applications addressing authentication, registration, account management as well as 3rd party (social) account authentication
It does most of the things you want, you can go through the documentation
https://django-allauth.readthedocs.io/en/latest/index.html
I have a very simple page which includes the necessary OpenGraph tags to create an OpenGraph object when liked, and I would like to be able to post as that page. From what I understand, I require an access_token for the page and I can obtain it by either visiting the OpenGraph page...
https://graphs.facebook.com/PAGE_ID?fields=access_token
...Or from my account...
https://graphs.facebook.com/me/accounts
...with a proper user access_token.
However, if I check either of these, there is no access_token for my page; if I check the pages for my account, it's not even in the list.
I have made sure to include an fb:admins tag on the page with my user id, and I have also liked the page (as described in 'Page Administration' in the Open Graph documentation).
Why can I not obtain a page access_token for my OpenGraph object?
Why can I not obtain a page access_token for my OpenGraph object?
You can not get a page access token for Open Graph objects – that’s just available for Facebook pages.
https://developers.facebook.com/docs/opengraphprotocol/#publishing says you need an app access token to publish updates to users who liked your Open Graph object.
If I'm an admin of Fan page with "like" gate (i.e. user has to like the page before he is able to see the content) - what information can I potentially get about the users who liked my page? Can I see what other pages they liked, and so on?
Thank you.
The only extra information you get is indication whenever he liked the page, nothing more.
Liking page doesn't grant your application access to user's details, so to get any info except some generic data in signed_request(like age range and locale) you need to authorize user.
I'd like to know if the following is possible using Facebook apps:
I'm using the Facebook SDK for .NET and want to create an app that a page will use. The app will take a photograph from a user who happens to visit the page, that photograph should then be sent to one of the page's photo albums.
I've managed to perform this successfully, but only when logged in as the page admin. If I log out of the page admin, log in as my personal Facebook account (as most users of the app will do) then the photograph never gets sent to the pages photo album.
I would like to do all of this when the user uploads the photo, but if it isn't possible I'll need to look into a separate process to actually send the photo's to Facebook, and just store the image on my server until the process runs.
The admin photo album (aka page photo album) is not the same album as non-page admins get to upload to (which is the wall). They are separate buckets all together.
As you mentioned, you can always just upload and store the photos on your server, and then just have a feed item that links over to that image.
OK, apologies for the verbose title. Let me give the background in a bit more detail.
My website allows my registered users to create new pages, each of which has its own unique URL. Each page has a Facebook "Like" button on it. I've already implemented Facebook Open Graph API meta tags so that the pages are proper open graph objects, and when some other visiting Facebook user "likes" the registered user's page, a post appears on that Facebook user's wall saying they have liked the page. The Facebook Like widget also displays the number of "likes" that page has received as normal. So far, so good.
What I want to do is allow my registered users to be able to communicate back to the Facebook users who have liked their page. The community of "likers" for a page is a potentially valuable social media resource to the registered user, if only they could communicate back.
I am aware of the "admin page" link you get beside the Like button, which can be used to post to these people, but that is not an option for my registered users as they have no privileges in relation to the Like button.
What I want to do, if possible, is setup a form to capture the registered user's message back to the Facebook users, and then my website sends the message on their behalf, without having to ask for any extra privileges from the Facebook users.
The following Facebook documentation pages seem to say this is possible, but having followed the Open Graph API documentation, I can't get it to work as described - http://developers.facebook.com/blog/post/465/ and http://developers.facebook.com/docs/reference/api/ ("Publishing" subsection). I can get the access token correctly in the first request, and plug that into the second request to do the post, but that doesn't seem to do anything and doesn't return any error.
Since it doesn't work for me, I'm wondering if this is possible as described, or do I need to get some sort of extra permission to do this? I've seen reference to offline_access permission but as I'm new to this stuff I am not sure how it would fit in. If I have to get the Facebook users to grant permissions, this is not going to work as envisaged.
Any thoughts would be most helpful.
The short answer: No, You will never been able to post on someones wall as another user.
The long answer:
You could try to ask for offline access but then you are asking the user to hand over all their facebook data and give you access todo whatever you like their accound, so that is not likely to happend.
The next problem is that they have to be friends to be able to post on each others walls.
Thats why Pages was implemented, so that organisations could announce/talk with the people interested.
However if you have created the like button correctly and give the pages correct meta data, you are able to post to user who have liked it.
Scroll down to Publishing:
http://developers.facebook.com/docs/opengraph/
Just add a form for your user and let your system publish to the correct page, you probably will need a offline token from your own account or similar to use on the server.
Another more complex way could be to generate a facebook page for each page you have on your server.
When the user creates a page on your system a page is created on facebook but as your app as admin.
And when another user likes the page they like the facebook page, hence you have the possibility to post in that page and speak to the user who liked it. (whooa thats a mouthfull).