This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* Copyright 2011 Facebook, Inc. | |
* | |
* 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 | |
* |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<fb:login-button scope="manage_pages" | |
onlogin="getAccounts()"> | |
Grant Permissions to Allow access to Pages you admin | |
</fb:login-button> | |
<ul id="accounts"></ul> | |
<script> | |
window.getAccounts = pullAccounts(); | |
function pullAccounts(){ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env python | |
# | |
# Copyright 2009 Facebook | |
# | |
# 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 | |
# |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$app_id = "APP_ID"; | |
$app_secret = "APP_SECRET"; | |
$my_url = "MY_URL"; | |
session_start(); | |
$code = $_REQUEST["code"]; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
require '../src/facebook.php'; | |
$facebook = new Facebook(array( | |
'appId' => 'APP_ID', | |
'secret' => 'APP_SECRET', | |
)); | |
$user = $facebook->getUser(); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'net/http' | |
API_HOST = "graph.facebook.com" | |
API_BASE_URL = "https://#{API_HOST}" | |
path = "/boo" | |
uri = URI.parse "#{API_BASE_URL}#{path}" | |
http = Net::HTTP.new(uri.host, uri.port) | |
res = http.get(uri.request_uri, nil) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sqlite3 ~/Library/Preferences/com.apple.LaunchServices.QuarantineEvents 'SELECT datetime(LSQuarantineTimeStamp + 978307200, "unixepoch") as LSQuarantineTimeStamp, LSQuarantineAgentName, LSQuarantineOriginURLString, LSQuarantineDataURLString from LSQuarantineEvent' | sort |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
define('VERIFY_TOKEN', 'pancakes'); | |
$method = $_SERVER['REQUEST_METHOD']; | |
if ($method == 'GET' && $_GET['hub_mode'] == 'subscribe' && $_GET['hub_verify_token'] == VERIFY_TOKEN) { | |
echo $_GET['hub_challenge']; | |
} else if ($method == 'POST') { | |
$updates = json_decode(file_get_contents("php://input"), true); | |
file_put_contents('updates.txt',print_r($updates, true), FILE_APPEND); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html lang="en"> | |
<head> | |
<script> | |
function str2hex(str) | |
{ | |
var out_str = " "; | |
for(var i = 0; i < str.length; i++) | |
{ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<html> | |
<head></head> | |
<body onload="go()"> | |
<div id="log_div"></div> | |
<script> | |
function my_log(message) { document.getElementById('log_div').innerHTML += (message.toString() + "<br />"); } | |
// wiretap | |
(window.addEventListener || window.attachEvent)('message', function(e) { console.log('wiretap: ' + e.data); my_log("wiretap: " + e.data); }, false); | |