Hi, I have used gapi.client.rpcRequest to get the share count of a URL, but as we know that gapi.client.rpcRequest is deprecated and system suggest to use gapi.client.request.
I tried to found the documentation for same, but didn't got success, Can anybody help how can I use gapi.client.request to get facebook share count for any URL.
// Google plus Shares Count |
| var params = { |
| nolog: true, |
| id: $URL, |
| source: "widget", |
| userId: "@viewer", |
| groupId: "@self" |
| }; |
| |
| gapi.client.rpcRequest('pos.plusones.get', 'v1', params).execute(function(resp) { |
| $('.googleplus__count').text(_sci_social_count_format(resp.result.metadata.globalCounts.count)); |
| }); |
I have used above code to fetch share count using
rpcRequest.
Thanks