S
S
Sasha Brahms2015-12-24 22:08:15
PHP
Sasha Brahms, 2015-12-24 22:08:15

How to work with private API ( periscope )?

I found a library for using the periscope API... I have very little
experience with closed APIs, I can't figure it out at all
.

$ch = curl_init('https://api.periscope.tv/api/v2/loginTwitter?build=v1.0.2');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_NOBODY, 1);

$data = array(
    "bundle_id" => "com.bountylabs.periscope",
    "phone_number" => "",
    "session_key" => "nFIaOYJXfNJhgkg5kFlndRjx8",
    "session_secret" => "<XMxruYe5qRPy6aEdLs2ae6VB3GXqbsl2gaDfynYAjhVDohNgmB>",
    "user_id" => "nfdsalbgbd",
    "user_name" => "Eugene",
    "vendor_id" => "81EA8A9B-2950-40CD-9365-40535404DDE4"
      );

curl_setopt($ch, CURLOPT_POSTFIELDS, $data);
curl_setopt($ch, CURLOPT_COOKIEJAR, "my_cookies.txt");  
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1); 
print curl_exec($ch);
curl_close($ch);

Session_key and Secret_key taken from the Twitter API (registered the application, gave these keys)
Can you please tell me if there are lessons with working like an api?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
R
ragimovich, 2015-12-25
@ragimovich

Session_key and Secret_key taken from the Twitter API (registered the application, gave these keys)

session_key and session_secret, as well as user_id and user_name, are obtained in the third step of the Periscope login process via Twitter, not from the "registered application".
Yeah, manuals for working with closed, undocumented APIs are lying around every corner.
Let's say I have a PHP library that implements part of the application's functionality. Why do you need access to it? Spam or do something useful? Share your ideas, maybe I'll share the code. There is no special desire to produce spammers.

D
Denis, 2015-12-25
@prototype_denis

Look here https://github.com/gabrielg/periscope_api/blob/mas...

M
Minka9, 2016-03-13
@Minka9

What can be done? this is at least the ability to view the broadcast from the site or display a preview of the current broadcast (for a specific channel). You can also find out if there is a broadcast at the moment) I hope this can be implemented? I thought about it for broadcasting a show on Internet radio))

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question