Coder Social home page Coder Social logo

lemez / fb-bye-bye Goto Github PK

View Code? Open in Web Editor NEW
1.0 3.0 0.0 1.82 MB

Replacing the Facebook interface with a custom webpage featuring feeds from pages and groups I'd otherwise miss out on. Crappy FB products, bye-bye!

Ruby 3.06% HTML 92.27% CSS 4.66%

fb-bye-bye's Introduction

What is this?

An application to replace the horrible Facebook web app. I would delete my FB account - for those living in caves, some background on the sheer scariness - were it not for two things:

- messages from friends
- messages on pages/groups of musicians I follow

I have the lovely desktop app Franz to bring my Skype and FB Messenger conversations to one place. So I decided to write this app to bring the group and page posts I'm missing to my own clean desktop interface.

It carries out a few simple steps:

1. Queries the Facebook Graph API for 50 recent posts in the groups/pages I like
2. Saves each page's posts in a separate text file called {{my-page-name.json}}
3. Reads the json files and compiles them into a clean web page that I can read whenever I open a new tab
4. Repeat every two hours.

Facebook's crappy interface - bye bye!

How To Use

  1. Go to the Facebook developers site and add a new application

  2. Create a lib/koala.rb page with the following info from the new application settings page:

     Koala.configure do |config|
         config.access_token = MY_ACCESS_TOKEN
         config.app_access_token = MY_APP_ACCESS_TOKEN
         config.app_id = MY_APP_ID
         config.app_secret = MY_APP_SECRET
     end
    
  3. In lib/pages.rb, add relevant group or page details like this:

     ARTISTS = [
                 {'name' => 'Prince Rama Varma',
                 'file' => 'varma.json',
                 'page_id' => '101837289375'
                 },
                 
                 {'name' => 'MDR',
                 'file' => 'mdr.json',
                 'page_id' => '137283749618848'
                 }
              ] 
    

You can get the page_id from here.

  1. Test that the API is working by manually running the functions update_html or render_page from Terminal when inside the directory. This will update the index.html page, or provide some insightful errors if the project is not set up properly. To see if the API call is working properly and creating json files:

    ruby -r "./script.rb" -e "update_html"
    

or if you want to tamper with just the html/css:

    ruby -r "./script.rb" -e "render_page"
  1. Update your computer's cron tab in order to make your machine request updates every few hours or days, according to the frequency specified in config/schedule.rb (current default is every 2 hours)

    whenever --update-crontab
    

and check that the updating has worked by listing cron jobs:

    crontab -l
  1. Download a Replace New Tab Page extension in the browser of your choice and direct it to /path/to/my/project/fb-bye-bye/index.html in order to see your updated page every time you open a new browser tab. Happy days!

Miscellaneous

Notification count indicates the number of new stories since the last update, not since the last time the page has opened.

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.