Skip to content

Instantly share code, notes, and snippets.

View lmfrossard's full-sized avatar
🎯
Focusing

L. Frossard lmfrossard

🎯
Focusing
  • Rio de Janeiro - Brazil
View GitHub Profile
@jankuca
jankuca / index.js
Created March 17, 2011 09:48
Simple Facebook Graph API Node.js Client
var HTTPS = require('https');
var QueryString = require('querystring');
/**
* Facebook API Wrapper
* @constructor
* @param {Object} info Info about the Facebook application
*/
var Client = function (info) {
if (!info.id) {
@lrvick
lrvick / collect.py
Created May 10, 2011 20:07
Twitter / Facebook Data dumper
import urllib2
import json
import sys
import os
import re
import time
import rfc822
import sqlite3
import datetime
@terrettaz
terrettaz / friends_info.py
Created November 29, 2011 00:02
Get information about facebook friends and lists
#!/usr/bin/env python
# -*- coding: iso-8859-1 -*-
__version__ = "$Revision: 0.1 $"
__author__ = "Pierrick Terrettaz"
__date__ = "2011-11-28"
import sys
import re
import urllib
import httplib
@ismaild
ismaild / fbsearch.py
Created February 7, 2012 08:16
Search Facebook Graph API for specific string and write to CSV
#!/usr/bin/env python
# encoding: utf-8
"""
fbsearch.py
[email protected]
"""
import facepy
import csv
fieldnames = [u'category', u'name', u'id']
@rodrigo-x
rodrigo-x / gist:3890256
Created October 15, 2012 00:20
snippet - search no facebook com jQuery..
/*!
* jQuery JavaScript Library v1.7.1
* http://jquery.com/
*
* Copyright 2012, Rodrigo Nery
* Dual licensed under the MIT or GPL Version 2 licenses.
* http://jquery.org/license
*
* Copyright 2012, Rodrigo Nery
* Released under the MIT, BSD, and GPL Licenses.
@abelsonlive
abelsonlive / entarteur.py
Created December 5, 2012 05:35
use facepy for facebook feed dumps
from facepy import GraphAPI
import facepy
import re
import json
#meta variables
access_token = 'your_token'
page_id = 'the_page' # input page id here
base_query = page_id + '/feed?limit=300'
@fmasanori
fmasanori / Facebook Search Python 3x.py
Last active November 8, 2017 18:33
Python 3.x Facebook Search
#@@@@@Sorry: this code has been deprecated in 2015, April 30 with new Facebook 2.0 API version
import urllib.request
import json
def search(texto):
#pegue o access_token
#em https://developers.facebook.com/tools/explorer
url = 'https://graph.facebook.com/search?q='
tail = '&type=post&access_token=<copie aqui o access_token>'
resp = urllib.request.urlopen(url+texto+tail).read()
@tcelestino
tcelestino / facebook_comment.js
Last active November 8, 2017 18:27
Salvando comentário do Facebook em um post no sistema de comentários do WordPress.
// esse script terá que ficar no header.php
window.fbAsyncInit = function() {
FB.init({
appId : 'app id',
status : true, // check login status
cookie : true, // enable cookies to allow the server to access the session
xfbml : true // parse XFBML
});
@marioplumbarius
marioplumbarius / quick-sort.js
Created May 18, 2013 19:52
Lista de algoritmos úteis em javascript: quicksort,...
function partition( array, left, right ) {
var pivot = array[Math.floor((left + right)/2)],
i = left,
j = right;
while ( i <= j ) {
while ( array[i] < pivot ) {
i++;
@jboulhous
jboulhous / serach-facebook-pages.js
Created August 5, 2013 03:39
Seach for facebook pages
function getUrl(query,type,callback){
var access = Meteor.user().services.facebook.accessToken
var url = 'https://graph.facebook.com/search?'
url += $.param({
q:query,
type : type,
access_token : access
});
return $.get(url,callback);
}