How to access Xing profiles via API and PHP

Note 2018-03-19: This post is deprecated as AFAIK Xing does not provide this API anymore.

Yesterday I have dabbled in accessing Xing profiles via API. For years people were asking Xing to finally provide an API but they were hesitant because of the strict privacy laws in Germany. Xing has lost users in the last months and other social networks already have APIs so they were forced to provide an API as well. Competition *does* work apparently. :)

Since I don’t have time to make a polished product out of it I thought I share my result with you in the hope you will let me know what you did with it. Let’s go.

The goal is to access a Xing profile (your own for now as you would have to use production keys and have your Xing API app reviewed by Xing in order to access other people’s profiles) and display the profile as raw data for further processing. You can go from there, making the profile information look beautiful, store access tokens and user IDs for subsequent requests and so on.

  • Go to dev.xing.com and register as a Xing developer. Once you have, log in and retrieve your testing OAuth consumer key and consumer secret.
  • Get oauth-php library from Google Code, unpack it and push it on a web server.
  • Grab my Xing client example, unpack it and put it in oauth-php’s client example dir. Edit xing.php and enter your OAuth consumer key and consumer secret and the full callback URL to xing.php.
  • Call xing.php in your web browser. You will get redirected to Xing so that you — as a Xing user — can give your Xing API app permission to access your profile. Once you have given permission, Xing will redirect to the xing.php script which will display raw profile data. If everything went well that is…

Now you have a go. :)


Posted

in

,

by

Tags:

Comments

2 responses to “How to access Xing profiles via API and PHP”

  1. […] gibt bereits erste Ansätze von Beispielapplikationen auf Basis von Ruby und PHP I, […]

  2. Hi Rene,

    thank you very much for this piece of code. I was trying to connect with XING API using standard OAuth client package and it didn’t work out. Your code works great.

    regards,
    Christian

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.