Coder Social home page Coder Social logo

kmrashish / facebooknewsfeedsample-android Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dinesharjani/facebooknewsfeedsample-android

0.0 2.0 0.0 24.33 MB

This is a simple project made using Android Studio for the Android platform which allows you to perform Graph API Requests and show a Logged-in user's Newsfeed.

License: Apache License 2.0

Java 28.68% HTML 71.29% CSS 0.03%

facebooknewsfeedsample-android's Introduction

FacebookNewsfeedSample-Android

Introduction

Screenshot

It's the year 2013. Facebook's Android SDK was first announced in May 2010 at Google I/O, and I know it because I was there going through all the stands. Yet, here we are and there is still not a single Sample Code Project, not even from Facebook itself, for you to access the Graph API and pull down a user's Newsfeed.

Until now, of course.

Description

This simple Project is targeted at Android 2.3 and upwards, and uses Facebook's latest Android SDK to display a user's Newsfeed. I'm not yet into the Maven vibe (although I know what it does) so I added the SDK directly into this project. I also wanted a fancy way for you to refresh the Newsfeed, so I went to [Chris Banes' Pull-to-Refresh project] (https://github.com/chrisbanes/Android-PullToRefresh) and added it, too.

To test it, you simply tap on the "Login" button at the bottom, introduce your Facebook credentials, it'll ask permission to read your Newsfeed, and a couple of seconds later (it works asynchronously, but I left out a visual indicator) you'll see it pop onscreen. If your own Newsfeed is very busy, you can Pull-to-Refresh a couple of seconds later and see the new items pop right at the top. No, it doesn't include any [fancy Gap Detection code inside] (http://dinesharjani.com/post/48561548010/week-3-gap-technology-part-1).

My recommendations to anyone interested in this code: please, please, please, have a look at the [official Facebook Documentation] (https://developers.facebook.com/). In a couple of ways I consider it a mess because it doesn't focus on what's most important to you as a 3rd-party developer looking to access the Graph API, but if you go through all of it calmly, and take time to play with their tools, specially their [Graph Explorer] (https://developers.facebook.com/tools/explorer), you'll be able to better appreciate how this code works and what you can do with it to suit your own needs.

Instructions

There are a couple of things you need to go through to get this code working for you.

Other stuff

Keep in mind this code is for sample purposes. Even so, I made use of Fragments and split the code into sub-packages just like I do in production to make it all tidy and it's well documented. Right now I don't envision expanding this Sample with more features (posting to Facebook, or adding ActionBarSherlock, for instance), but if you want to do it before I do, feel free to do so and by all means get in touch with me.

Acknowledgements

Contact

Dinesh Harjani

License

Copyright 2013 Dinesh Harjani

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

facebooknewsfeedsample-android's People

Contributors

dinesharjani avatar

Watchers

James Cloos avatar Ashish Kumar avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.