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
yam.connect.loginButton('#yammer-login', function (resp) { | |
if (resp.authResponse) { | |
yam.request({ | |
url: '/api/v1/users/current', | |
type: 'GET', | |
success: function (msg) { | |
document.write('<IMG SRC="' + msg.mugshot_url + '">' + '<h3>Welcome Back ' + msg.full_name + '!</h3>'); | |
}, | |
error: function (msg) { alert('Data Not Saved: ' + msg); } | |
}); |
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> | |
<?php | |
$ch = curl_init(); | |
$body ="{\"type\":\"text\",\"text\":\"hello\"}"; // type: text, text: hello | |
$headers = array('Content-Type: application/json'); |
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
{ | |
"actor": { "name": "Otto 1", "email": "[email protected]" }, | |
"action": "follow", | |
"message": "A message I am following", | |
"users": [{ "name": "Otto 2", "email": "[email protected]" }], | |
"private": true, | |
"object": { | |
"url": "http://www.example.com", | |
"type": "person", | |
"title": "Object Title Otto Test", |
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<script type="text/javascript" src='https://assets.yammer.com/platform/yam.js' data-app-id="EojZmPyBpg0kPaTCDAanw"></script> | |
<script> | |
/* Note: Using yam.config instead of data-app-id also causes duplicate callbacks | |
yam.config({ | |
appId: 'EojZmPyBpg0kPaTCDAanw' |
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
<!doctype html> | |
<html> | |
<head> | |
<script data-app-id="hyB2pTvrL36Y50py8EWj6A" src="https://assets.staging.yammer.com/platform/yam.js"></script> | |
<style type="text/css"> | |
#embedded-follow { | |
width: 800px; | |
height:650px; | |
} |
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
yam.connect.embedFeed({ | |
container: "#embedded-feed", | |
network: "microsoft.com", | |
feedType: "open-graph", | |
objectProperties: { | |
title: "Win 8 App Home", | |
image: "http://betanews.com/wp-content/uploads/2012/02/Windows-8-logo-300x300.jpg" | |
} | |
}); |
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
// doesn't work | |
yam.connect.embedFeed({ | |
feedType: "open-graph", | |
container: '#embedfeed', | |
network: 'contosofoods.onmicrosoft.com', | |
objectProperties: { | |
url: "https://box.com/file/abc123", | |
type: "file", | |
title: "Yammer ROI.pdf", | |
image: "https://dox.com/file/abc123.png" |
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
POST to "https://www.yammer.com/api/v1/activity.json?access_token=<my valid access token>" | |
{ | |
"activity":{ | |
"actor":{ | |
"email":"[email protected]", | |
"name":"Chris Pal" | |
}, | |
"action":"pawdev:attend", | |
"object":{ |
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
/** | |
* Listeners | |
* | |
*/ | |
chrome.tabs.onActivated.addListener(function(activeInfo) { | |
refreshHiddenDomainsList(); | |
chrome.tabs.get(activeInfo.tabId, function(tabObj) { | |
load_content_script(tabObj); | |
}); |