S
S
shevchenko_ch2016-01-19 14:54:59
Google Plus
shevchenko_ch, 2016-01-19 14:54:59

How to get share count on googleplus?

I try this method:

var data = [
      {
        method: 'pos.plusones.get',
        id: 'p',
        params: {
          nolog: true,
          id: 'http://my-pretty-domain.ru',
          source: 'widget',
          userId: '@viewer',
          groupId: '@self'
        },
        jsonrpc: '2.0',
        key: 'p',
        apiVersion: 'v1'
      }
    ];
    var apiKey = 'AIzaSyA-my-pretty-key-TfPidYS6Tf9Q';
    var url = 'https://clients6.google.com/rpc?key=' + apiKey;
    $.post(url, function (data) {
      console.info(data)
    });

But in the console I see smth. like that:
XMLHttpRequest cannot load https://clients6.google.com/rpc?key=AIzaSyA-my-pre... No 'Access-Control-Allow-Origin' header is present on the requested resource. Origin ' my-pretty-domain.com ' is therefore not allowed access.

Moreover, the response-header contain status-code: 200

Answer the question

In order to leave comments, you need to log in

Similar questions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question