Can I prompt a user to log in to facebook through a bookmarklet generated div? - facebook-graph-api

I'm looking to see some info about my facebook contacts, and I want the info to be overlayed on the currently open website.
Currently, I'm trying to do this via a bookmarklet.
Is it possible for me to overlay a div over the currently open web page and populate it with a functioning facebook login button (if the user is not logged in)? Are there publicly available working examples of something like this?

It is probably not possible to simply embed Facebook within an iframe because Facebook blocks people from embedding their pages within frames or iframes by putting this into the response header, "X-Frame-Options: DENY". This is most likely to prevent click-jacking and similar security exploits.
To test this, enter any page from Facebook into http://savanttools.com/testframe
Facebook has an API which allows you to do many things, but it requires server side code, and can not be done simply with a bookmarklet.
There is also always the brute force method where your server scrapes data from any website you want it to. Then that data could be put into a bookmarklet.
Finally, the same thing could be achieved by writing an add-on or a user script without using a bookmarklet at all.

Related

Django and Post to Facebook (no authentication)

OK, I need some help understanding the process behind Facebook's website integration process and how I can integrate it into my web app....
In its most basic form, my site stores and displays users' comments about products (there's more to it than that, but that's all that's relevant for this question). What I'd like to do is allow them to post that comment, together with the name of the product (and my site), to their Facebook wall by clicking a button.
I do not need the users to log in to my site at all, either with Facebook or any other authentication system and the Post to Facebook part is optional.
Obviously if they decide they do want to post their comment to Facebook, then they'll need to login, but I'd rather temporarily take them away from the page to login, post and then be brought back to my site.
What I need to know is how much of Facebook's APIs, Open Graph and Auth systems do I actually need to integrate?
I had hoped that I might be able to generate a simple link to Facebook with their comment embedded as a POST element...?
I'd be really grateful if someone could point me in the right direction!!
(P.S. I need a similar solution for Twitter, but I think that's easier!?!)
The Feed Dialog doesn’t allow including of a pre-set message any more, so you’d have to make that post via the Graph API if you want to pre-fill the message (and even then, you should only do so, if you’ve given the user the possibility to edit the pre-filled message first).
See here for how to make a post on a user’s behalf via Graph API, https://developers.facebook.com/docs/reference/api/user/#posts
You can do that all client-side, if you embed the JavaScript SDK into your page.
You need to set up an app on FB, then have the user connect to it (using FB.login), ask for the necessary permission (publish_stream) while doing so, and after successful login use FB.api to make the Graph API call.

Facebook communication to Application

The start-up i currently work for is oriented around restaurant wait times. For our v1.25 specifications our clients -restaurants- that have Facebook pages want to be able to communicate to their app profile from their Facebook page.
The closest i have came to answering this question is the Graph API. However, the Graph API only allows us to read and write data to FB pages. So, is there a way for a restaurants FB page to write to its app profile? Secondly, Loso, whom we have modeled some of our designs from has this ability, does anyone have an idea as to how they have done it?
--Boris M.
Here is an option that you can consider...
When you are designing the app you can also develop a page tab to go with it...
You will find this option in the basic settings of the app.
You can make it to install for all first time users of your app, by getting a list of all his pages he created using that profile then install it on the one he selects.
This page tab when installed on a page will appears just where other tabs on the page appers(e.g. events, notes etc. occurs)
You can provide your required functionality on this tab as you like.
Thus the user can just select that tab on the page and use its functionality to post on the profile page of the app.
Hope this works for you... and also u can check out the jobcaster app it does something like that!

Offline testing of OpenGraph / 'Like'

How can I test the 'Like' button functionality and OpenGraph data embedded in my pages while my site is not publicly accessible?
I have an internal test environment where my site is being built and tested. The environment is locked down by IP to a certain set of machines. I want to be able to verify the end-to-end scenario of performing a 'Like' and seeing the parsed OpenGraph data on a user's Timeline without having to open up my site to public access.
I know there's a user agent for the Facebook crawler, but allowing by user agent is risky as anyone can send any user agent string. Ideally, I'd like to lock it down to Facebook's crawler's IP range without having to parse logs to find what one or two of those IPs might be (I assume there's quite a few machines crawling the web for data).
My problem today is that I can click 'Like' and have it show up with a plain URL back to my site, but the crawler can't reach me since the page effectively doesn't exist for it when it hits my server.
How can I test the 'Like' button functionality and OpenGraph data
embedded in my pages while my site is not publicly accessible?
You really cannot do that. It has to be lint-able by Facebook. See: https://developers.facebook.com/tools/lint Be sure your page is publically avaible and able to be linted by the facebook linter tool.
This works fine with four social network previews: https://chrome.google.com/webstore/detail/open-graph-preview/ehaigphokkgebnmdiicabhjhddkaekgh?hl=es
It doesn't support the like button, just the preview.
From my localhost...as "proof of solution"

Help with design a facebook integration for my website.. App or Page?

I´m building a website to post my own videos using JW Player running my own ads as overlay.
www.planetsnowmobile.com
All my videos will be
Instead of register my own users, having my own forum etc etc I want to use facebook to interact with my visitors:
Individual discussions/comments on individual films instead of my own comment/forum-function
facebook-like-button for individual films (so induvidual like buttons for individual films)
Share induvidual films
Grab location from every unique visitor
Where do I start?
Do I need to create an application or should I use a Facebook "page"?
Maybe both?
I see that i can add an application to a "page" but what does that really do? How do I use that?
What would be the best way for me to do this?
I already have a Facebook "page" for my website and I just created an App as well.
Which one should I use?
Do I need both?
What is the difference?
I know that I can create a like button for a website address on http://developers.facebook.com/docs/reference/plugins/like/
But can I monitor that like button from example an application if I can connect them somehow?
Is that something I want to do?
My Facebook-page already have a user-base where my Facebook-application does not.. is my best option to delete my "page" and start all over with my "application"?
App is their encompassing term for any application that uses their API, this could be on Facebook or on your own personal website - these require an API key to make authenticated calls for users. Pages are FB's own in-Facebook content that users have created, like page for a business located at facebook.com/mybusiness. It sounds like you already have a website and want to add Facebook functionality to it, so you don't want to make another Page. You may not even need to create an App. Things like comment boxes and like buttons can be dropped in as stand-alone copy-and-paste widgets. You can track the like button by enabling FB insights for your website.
So like you noticed you can add a like button to your page using the social plugin from http://developers.facebook.com/docs/reference/plugins/like/ - similar to the like button you can add comment boxes with the plugin at http://developers.facebook.com/docs/reference/plugins/comments/
You can track the results from these plugins by adding your website to Facebook's analytics (Insights) at http://www.facebook.com/insights/
Most of these things are powered by the opengraph metadata in the headers of your website's pages. You can read up on what tags FB uses here http://developers.facebook.com/docs/opengraph/
Everything at http://developers.facebook.com/docs/plugins/ can be used without an application or page ID, and is very good about being responsive to the page they are hosted on: you can add a like button to your video view template without a defined URL in the like button's parameters, and it will automatically direct any likes to the url of the currently viewed video.
You could also direct a like button to point to your existing FB Page, in which case any likes collected from it would be added to the Page's total. Most companies that have a home-page like button do this, so their likes all accumulate to a single total for their business.
Hope that helps.

Facebook integration... Where to start?

I recently put a django project of mine into its beta stages and would really like to integrate more with social media, particularly facebook.
Now there are so many facebook integrations out there... I don't know where to start but, I'll tell you what I am after.
My sites publishes content with photos and also user related data (which site doesn't)
on each individual page I already have a facebook like button that basically has the absolute url of that page
so for instance:
http://my-site.com/url-1
http://my-site.com/url-345345
http://my-site.com/url-456456456
When a user likes this particular url I would like them to become a Fan on my facebook site/page as well.
I also added the FB opengraph tool which is a bit more informative once a user likes it. But it still does not publish any statistics to my page.
Can someone give me a bit of an understanding on what the best option is for this type of integration?
As a security option for the user, Facebook has never allowed third party access to "become a fan."
If you want to record locally when someone presses the "Like" button, you'll have to implement it locally (copy the presentation, and query Facebook yourself), so you can intercept the event. I've done that; it's not too hard.
I suggest you review the Connect Terms of Service to see what it is you're allowed to do: http://developers.facebook.com/policy/