I am interested in doing this and writing this blog.
I am a little interested in Weibo and phthon, so I tried Python's Weibo SDK. This SDK was not officially maintained, but created by Daniel Liao Xuefeng, he also used this SDK to make a demo, which can run on Sina's app
Engineer, open-source. So I started with referring to the document he published.
I still know about Weibo SDK and oauth2.0, but I still encountered two problems at the time. I recorded them and gave them a reference.
1. After uploading the code to Sae, enter the http://yourappname.sinaapp.com/log on to your application, click "Log on with Sina Weibo", but the following error is prompted
I was too sleepy at the time. I didn't take the error seriously and sent an email asking @ Liao Xuefeng, but I figured out why when I was in bed the next morning. @ Liao Xuefeng only tells me the reason in the email and does not tell me where to change the callback page. Then I took a long time to read the Python code again and finally found it in URLs. in the last two lines of the file, Py finds the modified location and can be used after the code is uploaded.
2. although Weibo can be sent, the source displayed on Weibo is Mini Weibo. This is strange. It uses my app key and app secrect, but displays the name of another app. Then I asked @ Liao Xuefeng again. I thought it was wrong for him to reply to me, so I made a hard task on my own. I found that there was no record in the SQL user table. Here we should have recorded the talent pair that used this application. On the other hand, I put the mini
Weibo cancels authorization, but when I re-access it, it actually appears in my application, instead of the application I applied. It's really strange. After I keep trying to find the cause of the problem, I have to change the callback page from the http://sinaweibopy.sinaapp.com/callback to the self-callback page http://yourappname.sinaapp.com/callback
3. another point is that if the Code cannot be uploaded to Sae, you must create a folder named 1 in the root directory and put all the source code under the 1 folder. Because an sae may have multiple versions of software, they use the root directory folder to identify which version of the software was used at that time. This can be set in the SAE background.