Adding Facebook Pages Search Directory to Website - ruby-on-rails

Are there any methods of adding something like the existing Facebook Pages directory to a website?
Directory can be found here: https://www.facebook.com/directory/pages/
I am currently using the Facebook API in my Rails app and I have a way to eventually solve this problem. However, it requires requesting access from Facebook and getting approved which will take a bit of time and adding the search might be a better option for my implementation anyway.

The only way to implement a Facebook Page search on your website is the Search API: https://developers.facebook.com/docs/graph-api/using-graph-api/v2.2#search
You do NOT need to get approved for that, you only need an App Access Token. See the following links about Access Tokens:
https://developers.facebook.com/docs/facebook-login/access-tokens/
http://www.devils-heaven.com/facebook-access-tokens/

Related

IOS twitter feed tutorial

I am currently building an app where they require all their users to be able to view their feeds only.
I looked at a lot of tutorials online which talk about the new api v1.1 of twitter and now authentication is required at all times.
I see a lot of examples and even successfully followed several of them like
http://www.appcoda.com/ios-programming-101-integrate-twitter-and-facebook-sharing-in-ios-6/
I even saw a tutorial posted on the twitter dev page.Following all of these focused on a few key elements
Using ACAccount to retrieve the account settings of the current user
Using the SLRequest to encapsulate the HTTP request made to the twitter api
Retrieving the data in JSON format, parsing it and presenting it to the user
Well my question is, I do not want user specific feeds. It's like a company updates their twitter regularly, users using the app should get feeds regarding the company. So I was wondering if there was a way, the app provides some default or hard coded authentication information ?
Is there some sort of tutorial, library or anything out there to help me move in the correct direction ?
Thank You for your time and help.
Your going to want to implement the following API call to get that information:
https://dev.twitter.com/docs/api/1.1/get/statuses/user_timeline
Once your application is authorized you can make a call to,
https://dev.twitter.com/docs/api/1.1/get/statuses/MorleyGaelsGAA.json
That should give you the information you're looking for.

Using Google + API and LinkedIn API within a desktop application (without prompting user for username-password)

I'm going to create a page which will download user's activity and save it in an .xml file because my iphone app needs to process it. The problem is that I cannot prompt the user for login-password... so I was wondering if there is a sort of permanent key that I can use to access into linkedin and gplus?
Thank you.
Google+
I can field the Google+ part of your question :)
You can access your users' public activity using the REST API's activity list method. To identify who they are you'll need to send them through an OAuth flow during which they will authorize you to know who they are on Google+.
The best way to get started doing server side OAuth flows in Google+ is to grab one of the starter projects and go through the included readme. That will give you a working project to copy code out of, or develop upon.
I'd include a code sample to show you how it works, but I don't know what would best apply to your back end :)
Linkedin
I'm far from an expert on their APIs, but it looks like the flow would be similar using OAuth.

Integration With Facebook

I've never used the FaceBook SDK before so I'm not sure what I should be using or whether what I'm thinking of can actually be done. But I want to try to integrate some Facebook functionality with my ASP.NET MVC3 application.
What I need to do:
I want to be able to access someone's Facebook account (granted their permission) and allow them to send out invitations to my website. But, when a friend clicks on the link in the invitation message (whether a wall post, PM... whatever), follows through and registers on the site, I want to be able to track that (maybe by appending the ID or username of the this user to the invitation link, and then extract it from the query string when the invited person/friend registers).
Questions:
From what I've read so far and according to this link, what I think I should be using is the Facebook Connect API. Am I right?
Is what I'm trying to achieve actually doable? Basically, can I append the username to the invitation link? Is Facebook okey with that?
Do you have any good resources other than the Facebook Developer Wiki? Share them please!
P.S: I do not want users to login to my website using their Facebook account. I have my own Membership system. I just want to allow them to invite their friends to register at my website and track that. More requirements might arise but for now that is all what I need.
Your help is appreciated!
EDIT:
Ok I went ahead and created some test app using the Developer FB app to do some experiments. One thing I do not understand though...
Canvas Page: The base URL of your app on Facebook.
Canvas URL: Facebook pulls the content for your app's canvas pages from this base URL.
So what exactly is the Canvas URL? From what I understand, it's a URL to a resource (page?) on my website which Facebook can display inside the Canvas Page, is that correct?
yes
Yes
Facebook documentation + facebook developers forum, that should be all for you. Also, as you are using asp.net mvc, facebooksdk discussion will help you also if you use that library. I will stringly recommend to use that library.
Also, it seems, you are a beginner on facebook api with c#. If so, you can consider my blog post for beginners on facebook open graph api tutorial in c#. There also some other related posts also.Hope you may like them.
Let me know if you wanted to know something else also specifically.
Yes
Yes
Nope. The Developer Wiki has its issues but the Facebook Docs usually solve your problems.

Simple Facebook API usage in Rails 3

I want to connect my app to Facebook in order to post on the user's wall. I want the user to click to post a message on his Wall, the pop-up of the js SDK should appear, he would login and authorize and get redirected to the home page as the pop-up disappears.
I was trying the fb_graph gem but had some hard troubles and I want to know: Is there a simpler way to do it?
Note that I don't want to make the user able to login in my app with Facebook, just post to his wall.
As Facebook does not offer any Ruby API, you will have to choose between using the JS SDK or implementing a Facebook share link.
If you only want to post in the user's wall, I recommend the second option because of ease and nature. You can customize the content of the post this way.
If you decide to go the JS way, you will have to:
Create a FB app.
Include FB SDK into your page.
Initialize the SDK with your app settings.
Ask for permissions to the user in order to post into her wall.
Assign a button to a function where you check for login. If she's already logged, show a window to post into the wall (FB popup or your own form, as the iframe dialogs are only available inside Facebook pages).
There is another alternative to step 5 by using Graph API and an access token, but it's a little bit more complicated and I don't recommend it if you are new to FB development.
I think, essentially, it's all or nothing when it comes to Facebook authentication. You're asking for permission to take over the user's identity and post on their Facebook wall - there will definitely be some kind of authentication and user approval. It's not a totally trivial process.
I'm sure you've looked already, but if you are OK using any of the social plugins that Facebook offers (http://developers.facebook.com/docs/plugins/), that might be an easier option to achieve what you're looking for.
If not, you'll have to gain a user's permission and post on the wall the way Facebook describes on their site. There's another gem, called Koala (https://github.com/arsduo/koala) that is pretty easy to use as well, but you can also take a look through the fb_graph documentation and see which pieces of code are applicable to your needs and duplicate that functionality.
The best source of information is on Facebook's site (http://developers.facebook.com/docs/reference/api/), where they describe the process in detail:
You can publish to the Facebook graph by issuing HTTP POST requests to the appropriate connection URLs, using an user access token or an app access token (for Open Graph Pages).
and
Most write operations require extended permissions for the active user. See the authentication guide for details on how you can request extended permissions from the user during the authentication step.
The first time I looked at this stuff I was totally overwhelmed, but play around with it and it will make a lot more sense.
I just saw #manuelpedrera 's answer, and that's a good step-by-step guide. Short answer: there's no shortcut.
Koala is a Facebook library for Ruby, supporting the Graph API (including the batch requests and photo uploads), the REST API, realtime updates, test users, and OAuth validation.
Take a look at Koala gem: https://github.com/arsduo/koala

I Don't Need a Facebook App, I just want their API (in Ruby)

Can I use Facebooker without having to create a whole Facebook App in their Developer section?
I don't need to create a Facebook App with Facebooker, I just want to be able to create events and posts on Facebook with my own custom admin panel on my site. Facebooker seems to have everything built already, so I wouldn't want to use just a raw Rest-Client library.
Can I use Facebooker to read/write to Facebook without creating an App? I'd love to know. If not, can I read/write to Facebook without creating an App another way without resorting to either raw REST requests or page scraping/mechanize?
Thanks for clearing this up.
You have to have created an App in order to get an API key and Secret Key. You must have these keys in order to use any of the FB platform API (including Facebook connect).

Resources