The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
#1
|
|||
|
|||
Incorporating vBulletin within a Mobile App
Hello,
We have a mobile app and would like to incorporate the vBulletin posts within our existing app. Can we do this? Is there any APIs which will be helpful ? Thanks debashis |
#2
|
|||
|
|||
I never know how to answer that question. It can be done. The company I work for has incorporated vbulletin in our company app. We only incorporated the parts of vbulletin we were interested in as we wanted it very specialized.
vBulletin Mobile API http://www.vbulletin.com/vbcms/conte...334-mobile-api vBulletin Source /includes/api/ |
Благодарность от: | ||
bravura |
#3
|
||||
|
||||
This is not a article, it's a question.
|
#4
|
|||
|
|||
Quote:
Now i am stuck with an error "invalid_api_signature " while trying to login. I am doing the Integration using C#. I called api_init and i got the apiversion, apiaccesstoken, vbulletinversion, apiclientid and secret. Then i called login_login and passed apiclientid, apiversion, apiaccesstoken and api_sig as query string. I have passed vb_login_username and vb_login_md5password as content. Please see the below C# code for creating the api_sig and for creating a http post request. /////// C# Code ///////////////////////////// apiVersion = HttpUtility.UrlEncode(apiVersion); apiAccessToken = HttpUtility.UrlEncode(apiAccessToken); vBulletinVersion = HttpUtility.UrlEncode(vBulletinVersion); apiClientId = HttpUtility.UrlEncode(apiClientId); secret = HttpUtility.UrlEncode(secret); apiKey = HttpUtility.UrlEncode(apiKey); using(MD5 md5Hash = MD5.Create()) { md5Password = GetMD5Hash(md5Hash, password); } string login_string = "api_m=login_login" + "&vb_login_username=" + userName + "&vb_login_md5password=" + md5Password; using (MD5 md5Hash = MD5.Create()) { api_sig = GetMD5Hash(md5Hash, login_string + apiAccessToken + apiClientId + secret + apiKey); api_sig = HttpUtility.UrlEncode(api_sig); } String login_request = "vb_login_username=" + userName + "&vb_login_md5password=" + md5Password + "&cookieuser=true"; String request = "?api_c=" + apiClientId + "&api_v=" + apiVersion + "&api_m=login_login" + "&api_s=" + apiAccessToken + "&api_sig=" + api_sig; url = url + request; HttpWebRequest req = (HttpWebRequest)WebRequest.Create(url); req.Method = "POST"; req.ContentType = "application/x-www-form-urlencoded"; req.ContentLength = login_request.Length; CookieContainer a = new CookieContainer(); req.CookieContainer = a; System.Net.ServicePointManager.Expect100Continue = false; // prevents 417 error using (StreamWriter writer = new StreamWriter(req.GetRequestStream(), System.Text.Encoding.ASCII)) { writer.Write(login_request); } response = (HttpWebResponse)req.GetResponse(); using (StreamReader reader = new StreamReader(response.GetResponseStream())) { //cookie = reader.ReadToEnd(); JavaScriptSerializer js = new JavaScriptSerializer(); jsonResp = js.Deserialize<Dictionary<string, object>>(reader.ReadToEnd()); } Please help me on this. If it is wrong can you please give me some sample code for creating api_sig in C#. I have implemented this code in C# for creating api_sig by looking at one of the posts where the code was in PHP. Below is the link which i took as a reference for creating the api_sig. https://vborg.vbsupport.ru/showthread.php?p=2321926%20 Thanks |
Thread Tools | |
Display Modes | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|