Git Product home page Git Product logo

hybridauth-xing's Introduction

XING DECIDED TO DISABLE THEIR PUBLIC API!

Please read https://www.xing.com/communities/posts/important-information-about-xing-public-api-support-1012409468?sc_o=as_g.


HybridAuth provider for the XING.com API

Tested with HybridAuth 2.1.1-dev and 2.4.0-dev.

Requirements

Get the latest version (>= 2.4.0-dev) of HybridAuth from github.com/hybridauth/hybridauth.

Quick Start

After you downloaded and installed HybridAuth (see above), you'll have to modify the config.php. Add the following to the providers array:

"XING" => array (
	"enabled" => true,
	"keys"    => array ( "key" => "", "secret" => "" )
)

Create a new directory and put an index.php file in it, containing the following:

<?php
require_once '../Hybrid/Auth.php';
try {
    $oHybridAuth = new Hybrid_Auth('../config.php');
    $oXING       = $oHybridAuth->authenticate('XING');
    var_dump($oXING->getUserProfile());
    var_dump($oXING->setUserStatus('This is an example from PHP.'));
    var_dump($oXING->getUserContacts());
}
catch(Exception $e) {
    echo 'Error: ' . $e->getMessage();
}

That's it. :) The rest is up to you.

Deutsche Information auch in meinem Blog.

License

HybridAuth is released under dual licence MIT and GPL. So is HybridAuth-XING.

If you're using it somehwere, I'd love to hear from you. :)

hybridauth-xing's People

Contributors

alexschwarz89 avatar dawez avatar fabianbeiner avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

hybridauth-xing's Issues

getUserContacts broken

Commit 054fe37 introduced a tiny bug, that prevents getUserContracts from generating correct URLs.

$apiResponse = $this->api->get($requestEndpoint.$requestParameters);

The path and query part of the URL don't get separated with a question-mark character. Replacing the dot with a comma, fixes the problem.

403 Error when authenticating

Hi,

I'm authenticating like this

$xing = new XingWrapper();
if ( !$xing->hybridAuth->isConnectedWith('XING') ) {
    $xing->hybridAuth->authenticate('XING', ['hauth_return_to' => '/auth_xing.php']);
} else {
    $xingApi        = $xing->hybridAuth->authenticate('XING');
    var_dump($xingApi->getUserProfile());
}

However, after authenticating and calling the method getUserProfile()) I'm getting the following error

Profile request failed! XING API returned an error: 401 Unauthorized..

Do you need more information about the implementation or is this enough?

Number of contacts

The XING API can return just the number of contacts, if you leave the limit parameter blank. But it's hardcoded to 100 and will give you all contacts including all their information. Would be nice if we have another method like getContactCount or can pass a parameter limit.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.