GithubHelp home page GithubHelp logo

anantdgoel / projectfib Goto Github PK

View Code? Open in Web Editor NEW
748.0 95.0 182.0 593 KB

Chrome extension to flag fake news on Facebook. Built at HackPrinceton '16

Home Page: https://www.projectfib.com

License: Open Software License 3.0

Python 60.31% JavaScript 33.17% HTML 2.95% Dockerfile 3.58%
facebook python docker chrome-extension javascript machine-learning

projectfib's Introduction

Disclaimer: This project is not under active development anymore

Project Fib

In the current media landscape, control over distribution has become almost as important as the actual creation of content, and that has given Facebook a huge amount of power. The impact that Facebook newsfeed has in the formation of opinions in the real world is so huge that it potentially affected the 2016 election decisions, however these newsfeed were not completely accurate. Our solution? FiB because with 1.5 Billion Users, Every Single Tweak in an Algorithm Can Make a Change, and we don't stop at just one.

Installation

The easy way

Go to the chrome web store and add our extension to your browser

The harder way

(For those who want the latest features)
  1. Download "extension" folder from our repository
  2. Then go to your extensions page, check the box 'Developer Mode'
  3. Click "Load unpacked extension..."
  4. Find the extension where you downloaded it and select it
  5. The extension should be added now
Backend Server Docker Container

To build the backend python server locally to use with the extension, this repository includes backend/Dockerfile.

Build the Docker image

cd backend/
docker build -t hackprincetonf16 .

Run the Docker container locally on port 5000

docker run -it --rm -p 5000:5000 hackprincetonf16

Update var server in extension/myScript.js to http://localhost:5000 before installing the extension manually.

About us

This project is still under development (a lot of work is required and is also being put in). All of us are Univeristy students trying to help solve a problem social media faces. As university we may sometimes take a while to fix issues or approve pull request, please bear with us. We are always on the lookout for sponsors for this project as we are non-profit and need money to run our servers and cover our API costs.

Contributing to this project

We love contributors. We are open source and every contribution helps. Please read CONTRIBUTE.md for how to contribute to our project.

Licensing

This project is protected under Open Software License 3.0

Please read License.md

projectfib's People

Contributors

anantdgoel avatar antoniomedrano avatar aviralmansingka avatar bencxs avatar catherinecql avatar ecliptik avatar lewisje avatar m3we avatar marksho avatar noahcristino avatar nplusp avatar rahulhp avatar thundergolfer-two avatar tpeterson avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

projectfib's Issues

Add SURBL.org and URIBL.com checks too.

I made a post on Facebook that I think goes total in sync with your nice idea. Below inserted a translated version of what I wrote at https://www.facebook.com/lopolencastredealmeida/posts/10210500882618965

I still think the way to counter this is to associate something social ( "people-driven") similar to the Web of Trust with bad link databases (such as SURBL.org and URIBL.com) linked to URIs that are shared on FB. At least people could verify the honesty of the source, even if that is somehow fallible.

Something like a mix of https://addons.mozilla.org/en-US/firefox/addon/safe-preview/
and MyWOT.com service (the addon had some issues but I don't know if the API suffers of the same issues).

I used a similar scheme on a site that catches a huge amount of SPAM, Phishing and worms with virtually no impact on the system. It should not be so complicated for Facebook to implement it as well.

Some ideas

I was thinking of doing something similar, but came across this and wanted to comment. I love this though and thanks for doing it!

  • Have you considered using something more like an ad blocker model of having a blacklist of sites to minimize the server stress?
  • My plan was to literally call bullshit on some of these sites and slap a poop emoji on them. That and make sure you saw a popup if you tried to go to the site so you could get the warning before reading. This might be fun and a good way to get some attention.
  • Giving people a way to edit the list of accepted sites would be helpful just in case someone wants to use it but has exceptions or visits sites not on the list already.

I may have some time to help on these, if you're interested, but wanted to throw them out there, just in case.

Perhaps AWS lambda over Heroku?

Hey all, seems like your hack project blew up today ;) Congrats on all the traction.

Just a suggestion but you may want to look at moving over to something like AWS lambda to scale out your backend a bit more seamlessly. Seems like it might be a pretty good fit given the nature of the backend code is relatively stateless.

Stop using Web of Trust

There's a number of other metrics to use to judge a webpage's reliability than using the WoT, unless you'd like to support a commercial entity that accrues revenue by violating users' trust.
http://lifehacker.com/web-of-trust-sells-your-browsing-history-uninstall-it-1788667989

A few ideas might include using Moz's MozRank service, verifying an SSL cert, and checking the age of a domain in its WHOIS record to judge the reliability of a webpage and its content. I'd be happy to provide a fork demonstrating an example of how this may be equally as effective and not half as morally dubious.

License?

This is great! Can you add a license? You just need a text file in the root directory called something like LICENSE.txt with the appropriate text. The MIT license might be a good choice: https://opensource.org/licenses/MIT

Custom Classifier

Hey!
Firstly, I love your idea here.
Secondly, would you be open to creating your own classifier in python (Using Sci-Kit Learn or Tensorflow) to begin to categorize valid and invalid news sites instead of using a static list defined elsewhere? This would open the product up to being able to grow and learn as new data is fed to it. Is this something you would be interested in?

Docker image does not build and run properly

root@openmediavault:/Data/Docker/HackPrincetonF16/backend# docker run -it --rm -p 5000:5000 hackprincetonf16
Unable to find image 'hackprincetonf16:latest' locally
Pulling repository docker.io/library/hackprincetonf16
docker: Error: image library/hackprincetonf16:latest not found.
See 'docker run --help'.
root@openmediavault:/Data/Docker/HackPrincetonF16/backend# ^C
root@openmediavault:/Data/Docker/HackPrincetonF16/backend# docker build -t hackprincetonf16 .
Sending build context to Docker daemon 34.3 kB
Step 1 : FROM python:3.5.2-alpine
---> 7aa75d330a28
Step 2 : MAINTAINER Micheal Waltz [email protected]
---> Using cache
---> 26d679110053
Step 3 : ENV APP_DIR /app
---> Using cache
---> bb0e28124894
Step 4 : EXPOSE 5000
---> Using cache
---> 29d548e505ce
Step 5 : WORKDIR ${APP_DIR}
---> Using cache
---> 90da559c7fe2
Step 6 : RUN mkdir -p ${APP_DIR}
---> Using cache
---> 1845352ddbc6
Step 7 : COPY requirements.txt ${APP_DIR}/
---> Using cache
---> b1a94050da2f
Step 8 : RUN apk --no-cache add --virtual build-dependencies build-base && pip install -U -r requirements.txt && apk del build-dependencies
---> Using cache
---> 392166fdf27c
Step 9 : COPY *.py ${APP_DIR}/
No source files were specified
root@openmediavault:/Data/Docker/HackPrincetonF16/backend# docker run -it --rm -p 5000:5000 hackprincetonf16
Unable to find image 'hackprincetonf16:latest' locally
Pulling repository docker.io/library/hackprincetonf16
docker: Error: image library/hackprincetonf16:latest not found.
See 'docker run --help'.

source code issue: processed= spelled wrong, I think. 2 c's on second one. There is no var proccessed that I can see.

var picComment = test[i].querySelector('.uiScaledImageContainer._4-ep');
if(picComment != null && picComment.src!=undefined) {
//console.log(picComment);
httpGet(picComment.src, "image", data);
processed = false;
}

		var picPost = test[i].querySelector('._46-h._517g');
		if(!processed && picPost != null && picPost.src!=undefined) {
			//console.log(picPost);
			httpGet(picPost.src, "image", data);
			proccessed = false;

Documentation?

Super cool project! Would be nice to have some documentation though. Even just a README.md introducing the plug-in would be nice

api keys?

Your committed code contains your API keys.. Might want to invalidate them.. :shipit:

If you want some help

Howdy,

Hey if you want some help, I'm a release engineer/devops'y software engineer in Seattle. If you look at my org here (https://github.com/SavageLearning) you'll see I have a long running open source project for a Seattle non-profit. I'd be happy to help if I can.

-jimmy

503 Service Unavailable

I get this on my facebook home page:

https://trustfb.herokuapp.com/?content=http://shoo.ly/2ew35Is%3Fks%3D5079%26prof%3D407%26cid%3D13296486%26url%255B0%255D%3Dhttps%253A%252F%252Fwww.udemy.com%252Fmachinelearning%252F%253Futm_source%253Dfacebook%2526utm_medium%253Dudemyads%2526utm_campaign%253DNEW-FB-PROS-PROF-Business-BF-MachineLearn-CV-EN-ENG_._ci_950390_._sl_ENG_._vi_PROF_._sd_All_._la_EN_.%2B1%2Bcopy%2526utm_term%253D_._ag_Aff-World-BF-MachineLearn-CV-EN-ENG_._ci_950390_.%2B1%2Bcopy_._pi_1392110127495714_._gi_all_._ai_20--55_._an_BkWbAd_bf%2526k_clickid%253D_kenshoo_clickid__113296436
Request Method:GET
503 Service Unavailable

and

Request URL:https://trustfb.herokuapp.com/?content=unefine
Request Method:GET
Status Code:503 Service Unavailable

and

Request URL:https://trustfb.herokuapp.com/?content=http://www.chefuturo.it/206/11/curie-nobel-einstein/
Request Method:GET
Status Code:503 Service Unavailable

etc.

Problem with very generous resource sharing

Microsoft key:
https://github.com/anantdgoel/HackPrincetonF16/blob/master/backend/imageverify.py#L178
IBM Watson cloud key:
https://github.com/anantdgoel/HackPrincetonF16/blob/master/backend/imageverify.py#L161

Some wierd text API key:
https://github.com/anantdgoel/HackPrincetonF16/blob/master/backend/imageverify.py#L151

Some webtrust key:
https://github.com/anantdgoel/HackPrincetonF16/blob/master/backend/imageverify.py#L130

And finally, the App ID, key and secret of their Twitter app:
https://github.com/anantdgoel/HackPrincetonF16/blob/master/backend/imageverify.py#L56

Also you guys are using regex to parse html? Not a very good idea.

https://github.com/anantdgoel/HackPrincetonF16/blob/master/backend/imageverify.py#L104

Finally since there's already a bunch of people who forked this repository it's meaningless for you to delete this repository but to request to change your API keys.

Thanks for your generosity again.

Color contrast issues

Hey, I recently came across the Washington Post article about your project through a recent story about fake news. Congrats on being featured!

Very interesting stuff, but I couldn't help but notice the color contrast on the verification badges (verified, unverified) made it hard to see and read. Especially for those with color blindness/deficiency problems, it would be difficult to see the unverified badge (deuteranope).

I fumbled around with color combinations for a few minutes and while not perfect, here's what I came up with (deuteranope). Feel free to use that or another high-contrast combination (see: color contrast tool).

Though not a huge technical problem, I think it would definitely help with visibility when someone uses the tool in the future.

Thanks for your work and keep it up!

Update Chrome Extension (fbserve)

I see that the server name is changing from trustfb to fbserve but unless you rebuild the extension, it will continue to point to the old server...

Firefox extension

Hello! First off, amazing project and thanks. Secondly: are you going to provide a firefox extension as well?

Not seeing any badges - possible CORS issue

Hello,

First of all ... friggen' great idea! I'm looking forward to helping this come alive in any way I can.
I'm a developer with an non-profit organization that is actively looking for ways to apply technology to the way we live, relate, communicate and operate in the world so we can all thrive together. This fits right in; if we tell when we are reading or spreading disinformation we can choose not to do it and increase the chances of finding truth.

Second -- a possibly dumb question but I have installed this in chrome and I do not see any verified/unverified badges in my newsfeed. Not clear whether I should see one on every post or only those that can be reliably verified or discredited. I haven't actually tried posting any fake news yet -- do you have an example I could try to see if that is working?

Thanks for all your work on this! It's a very powerful idea and I'd like to help in any way I can.

Rotate and Scrub Credentials

I'm unsure if there are any paid APIs tied to this project, but it would be wise to rotate and scrub credentials from this repository, and load them from a git ignored file.

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.