Google+ API: Get Things I've +1ed - google-plus

I want to fetch all of a user's Google Plus activity. I can get all of a user's posts but I can't find any way to fetch everything a user have +1ed or commented on. Can I?

There is an open feature request for access to a users +1'd URLs. I did not find a feature request for listing comments from a user but you can request it: http://bugpl.us/new.

use this php code and u get particular activity comment's list
$optParams = array('maxResults' => 100);
$comments = $plus->comments->listComments(activityid,$optParams);
foreach($comments['items'] as $comment) {
print "{$comment['id']}, {$comment['object']['content']}\n";
}

Related

Correct voting results count are visible only after clearing cache manually in drupal 7

In one of my site I am using voting api and five star module.
When anonymous user rate the product then vote is increased by one and
then if we refresh the page old vote count is displayed
if we refresh the page by putting ?fsdfsd after the url then correct vote count will display.
I added
hook_votingapi_results($cached, $entity_type, $entity_id) {
$uri = entity_uri($entity_type, node_load($entity_id));
$path = url($uri['path'], array('absolute' => TRUE));
cache_clear_all($path, 'cache_page', TRUE);
cache_clear_all("field:$entitytype:$entityid", 'cache_field');
cache_clear_all("field:node:$nid", 'cache_field');
}
and it is page caching issue for anonymous users only.
Thanks in advance
In Configuration>Performance is the option to disable "Cache pages for anonymous users"

How to get activities from trello board

I have built a site that pulls the comments from Trello to show it on my site using this code:
var resource = "cards/" + card.id + "/actions";
Trello.get(resource, function(comments) {
if(!$.isEmptyObject(comments)){
var commentStr="<div class='comments_c'>";
$.each(comments, function(c, cda){
//console.log(cda.data.text);
commentStr += "<p>"+cda.data.text+"</p>";
//addComments(cda.data.text);
});
commentStr += "</div>";
}
console.log(commentStr);
Now it works fine to pull the comments but it doesn't show the activity like "Sarah Hastings added this card to ". The api documentation doesn't talk about it and I am at a dead-end. We need it for reporting and looking for a way to get the activities (copied, moved, added) from Trello to our site. Any help is appreciated.
By default, the cards/[idCard]/actions endpoint returns actions filtered to commentCard,updateCard:idList. If you want to get actions of additional types from that endpoint you will want to include the filter parameter with the list of action types that you want returned. You can see the full list of options documented here: https://developers.trello.com/advanced-reference/card#get-1-cards-card-id-or-shortlink-actions by clicking Show next to Arguments for that call.
For example actions of adding cards to a board would be of type: moveCardToBoard so you would want to add that to the filter parameter.

How to get the most popular page under a section using Site Catalyst (Omniture)?

I want to use the site catalyst api to get the most popular page (page that has maximum pageviews) under a given site-section? Let me explain better with an example.
My website has multiple channels (News/Journals/Books/Events etc). Each of the channel has many pages under it. I want a api call that will get the most popular news page or Journals page or Books page etc.
I am passing data to sitecatalyst like this..
s.pageName = o_title;
s.channel = o_structure
s.prop1 = o_iden
where o_title has the page title of a newspage or a journalpage etc..
o_structure refers to either "News" or "Journals" or "Books" etc.
Currently I am able to only get the most popular page on the entire site. I would appreciate if someone can help me find the most popular page per section.
Thanks,
Rag
I assume that you already know the basics of using the Omniture API, how to queue up a report and look for status and get it etc... here is a basic REST data string to get site sections (s.channel) broken down by page names (s.pageName) with page views as metric. You will use the Report.QueueRanked API method, and you need to specify the rsid(s) to get the data from and the date ranges.
{
"reportDescription": {
"reportSuiteID":"RSID",
"dateFrom":"YYYY-MM-DD",
"dateTo":"YYYY-MM-DD",
"metrics":[
{
"id":"pageViews"
}
],
"sortBy":"pageViews",
"elements":[
{
"id":"siteSection"
},
{
"id":"page"
}
]
}
}

Retrieving Interest/Page information out of facebook

Im wondering if there is anyway to interogate facebook data on user interests. i.e. Retrieve the following data sets:
What are the most like interests/Pages on facebook?
Retreive the current users facebook interest and also their friends interests?
Really want to know if we can get facebook global interest/like data and than also if the user connects their facebook account to the site than we can also retrieve their interest data.
Thanks in advance
So you want to implement something like http://www.socialbakers.com/ ?
To get 1) you'd have to periodically poll the API for the public fan count of a known set of page IDs to see the current fan counts ( i think this is what socialbakers do)
To get 2, get the user_likes and friend_likes extended permissions from your users and access the /likes connection of the users whose likes you want to read
Yes you can retrieve user interests from facebook. You just need to include the user_interests permission required in your jsp page.
https://developers.facebook.com/tools/explorer/
If you are using spring social you can generate your own url for /me/interests:
URIBuilder uriBuilder1 = URIBuilder.fromUri(facebook.GRAPH_API_URL + "me" +"/interests");
String s = facebook.restOperations().getForObject(uriBuilder1.build(), String.class);

Handling a return from Google Checkout

I need to capture server side a notification of a users payment. I've gone through a good majority of the documentation with no luck, but will go through it again. Is there a way to enable a "return to site" after they complete the order?
I searched google checkout return url and got http://www.phpexpertsforum.com/return-url-in-google-checkout-after-payment-t561.html
veerlapallavi wrote...
There are 2 methods through which you
can provide the return URL. 1) Go to
your Google checkout account and Open
the settings. In the settings>>Profile
you can find a field with name "Public
business website:" provide your return
URL there.
2) The second method is , You can pass
the value to Google Checkout with the
HTML form as a hidden variable.
<input name="continue_shopping_url"
type="hidden"
value="http://www.yousite.com/payment_success.php">
OR
Set a function as below
SetContinueShoppingUrl("http://www.yousite.com/payment_success.php");
function SetContinueShoppingUrl($url)
{ $this->continue_shopping_url =
$url; }
Hope that helps.
It looks like you can configure gcheckout to send you XML notifications, but I don't see how you can associate it with a particular order ID other than matching fields or something...
http://code.google.com/apis/checkout/developer/Google_Checkout_XML_API_Notification_API.html#new_order_notifications