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
GraphRequest request = GraphRequest.newMeRequest( | |
loginResult.getAccessToken(), | |
new GraphRequest.GraphJSONObjectCallback() { | |
@Override | |
public void onCompleted( | |
JSONObject object, | |
GraphResponse response) { | |
// Application code | |
JSONObject json = response.getJSONObject(); | |
if (json != null) { |
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
// Credit goes to http://stackoverflow.com/a/26400656/1651253 | |
func execcmd(cmdname: String) -> NSString | |
{ | |
var outstr = "" | |
let task = NSTask() | |
task.launchPath = "/bin/sh" | |
task.arguments = ["-c", cmdname] | |
let pipe = NSPipe() | |
task.standardOutput = pipe |
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
### Keybase proof | |
I hereby claim: | |
* I am lmedinas on github. | |
* I am lmedinas (https://keybase.io/lmedinas) on keybase. | |
* I have a public key whose fingerprint is C737 81D7 C8DE 0F32 2C77 E99A DEFC DC01 E06A AB68 | |
To claim this, I am signing this object: |