How to login as invisible?
Can someone guide on how to login as invisible, and also the sequence of calls to be made?
Do we need to use the stealth/visiblelist call, and set the request method as DELETE? or what?
Is the call to the invisible mode sent alongwith the call to create the session? Or after? Please provide a code example, I'd appreciate it. I am using C#
This is what I am doing now:
Step1. CreateSession();
Step 2. check if login invisble is selected, then make the call.
if (chkLoginInvisible.IsChecked == true)
{
LoginAsInvisible();
}
But I think if the call is made AFTER the session creation, the user will be visible for a brief moment, so it needs to be sent at the same time the session is created.
my method looks likes this:
public void LoginAsInvisible()
{
// set the invisible flag
string invisurl = "http://developer.messenger.yahooapis.com/v1/stealth/visiblelist" +
"?oauth_consumer_key=" + consumerKey +
"&oauth_nonce=" + new Random().Next(123400, 9999999).ToString() +
"&oauth_signature=" + consumerSecret + "%26" + oauthTokenSecret +
"&oauth_signature_method=PLAINTEXT" +
"&oauth_timestamp=" + getTimestamp() +
"&oauth_token=" + oauthToken +
"&oauth_version=1.0" +
"¬ifyServerToken=1" +
"&sid=" + yahooSessionInfo.sessionId;
HttpWebRequest invisibleRequest = WebRequest.Create(invisurl) as HttpWebRequest;
invisibleRequest.Method = "DELETE";
IAsyncResult invisResult =
(IAsyncResult)invisibleRequest.BeginGetResponse(new AsyncCallback(GetInvisibleListCallback), invisibleRequest);
}
I'd appreciate any help.
by
1 Reply