In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-16 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
PHP how to achieve everyone OAuth login and API calls, many novices are not very clear about this, in order to help you solve this problem, the following editor will explain in detail for you, people with this need can come to learn, I hope you can get something.
The PHP SDK given by Renren open platform is not very good, and it can't be run on my computer. It always has 113error, but there is no such error code in the search document, so I have to use PHP to realize it according to the official document. The code, as below, is not encapsulated, but just goes through the process. Encapsulation is not necessary if it is only used for login authentication such as an everyone connection and a simple API call. As a PHP demonstration of using Renren API. In the process of writing the code, I also refer to the SDK code and DEMO code of the official website.
Description:
1. Use the HttpClient class to initiate Get and Post requests, download the file to http://scripts.incutio.com/httpclient/, and place HttpClient.class.php in the root directory of the server.
2. You need to apply for APIKey and Key Secret (see http://wiki.dev.renren.com/wiki/Authentication) and set the bound domain name (setting to localhost is also allowed). The APIKey and SecretKey given in the following code are the parameters (http://wiki.dev.renren.com/wiki/Php-sdk-connect-demo-2.0) in the Demo code of the official website, which can be used for the time being.
3. Please encode the code file in utf-8, save it as "renren.php", and put it in the server directory.
4. Access through 127.0.0.1/renren.php
The code is as follows:
Is it helpful for you to read the above content? If you want to know more about the relevant knowledge or read more related articles, please follow the industry information channel, thank you for your support.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.