@shevchenko_ch

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.ru' is therefore not allowed access.


Moreover, the response-header contain status-code: 200
  • Вопрос задан
  • 318 просмотров
Пригласить эксперта
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Войти через центр авторизации
Похожие вопросы