`
jljxj
  • 浏览: 5982 次
  • 性别: Icon_minigender_1
  • 来自: 南京
最近访客 更多访客>>
文章分类
社区版块
存档分类
最新评论

腾讯微博API核心模块

阅读更多

'***********************************************************************************
'***本程序可以自由传播,本人不对您使用本软件及代码造成的任何后果承担任何责任**
'***利用此代码挣钱了也无需告诉我******
'***作者:龙小龙 QQ:31519488,部分代码来源于网络***
'***感谢中国农业人才网www.5ajob.com 大力支持***
'***中国农业人才网,让伯乐与千里马不再是偶遇***
'***********************************************************************************

Public c_baseUrl As String
    Public c_request_tokenUrl As String
    Public c_authorizeUrl As String
    Public c_tokenUrl As String
    Public c_App_Key As String
    Public c_App_Secret As String
    Public c_redirect_uri As String

    Public c_oauth_token As String '未授权token
    Public c_oauth_token_secret As String
    Public c_oauth_verifier As String
    Public c_access_token As String '授权后的token
    Public c_access_token_secret As String
    Public c_accesstoken2_0 As String 'oauth2
    Public c_refreshtoken2_0 As String
    Public c_expiretime2_0 As String
    Public c_getTokenTime As String '获得授权时的时间

    Public Sub Class_Initialize()

    End Sub
    
    Public Sub Class_Terminate()
    
    End Sub
    
    Public Function Get_oauth_token()
        Dim codeUrl As String, baseString As String, paraUrl As String
        Dim codeUrlTempalte As String '获取未授权
        Dim paraUrlTempalte As String
        Dim baseStringTemplate As String
        Dim tempstr As String
        
        codeUrlTempalte = "{0}?oauth_callback={3}&oauth_consumer_key={1}&oauth_nonce={2}&oauth_signature={5}&oauth_signature_method=HMAC-SHA1&oauth_timestamp={4}&oauth_version=1.0"
        paraUrlTempalte = "oauth_callback={3}&oauth_consumer_key={1}&oauth_nonce={2}&oauth_signature_method=HMAC-SHA1&oauth_timestamp={4}&oauth_version=1.0"
        baseStringTemplate = "{method}&{encode_request_tokenUrl}&{encode_paraUrl}" '用于生成signature
        
        oauth_nonce = makePassword(10) '随机数
        oauth_timestamp = DateDiff("s", "01/01/1970 08:00:00", Now()) '邮戳
        
        paraUrl = Replace(paraUrlTempalte, "{1}", Me.c_App_Key) '参数串
        paraUrl = Replace(paraUrl, "{2}", oauth_nonce)
        paraUrl = Replace(paraUrl, "{3}", Me.c_redirect_uri)
        paraUrl = Replace(paraUrl, "{4}", oauth_timestamp)
        
        baseString = Replace(baseStringTemplate, "{method}", "GET")
        baseString = Replace(baseString, "{encode_request_tokenUrl}", strUrlEnCode(Me.c_request_tokenUrl))
        baseString = Replace(baseString, "{encode_paraUrl}", strUrlEnCode(paraUrl))
        
'        Debug.Print baseString
        oauth_signature = HAMC_SHA1(Me.c_App_Secret + "&", baseString) ' + Me.c_oauth_token_secret
        codeUrl = Replace(codeUrlTempalte, "{0}", Me.c_request_tokenUrl)
        codeUrl = Replace(codeUrl, "{1}", Me.c_App_Key)
        codeUrl = Replace(codeUrl, "{2}", oauth_nonce)
        codeUrl = Replace(codeUrl, "{3}", Me.c_redirect_uri)
        codeUrl = Replace(codeUrl, "{4}", oauth_timestamp)
        codeUrl = Replace(codeUrl, "{5}", oauth_signature)
        
        tempstr = httpGet(codeUrl)
        Get_oauth_token = tempstr
        tempstr = GetValue(tempstr, "oauth_token\=(.*?)&oauth_token_secret\=(.*?)&oauth_callback_confirmed\=true", "0|1", False, False)
        atempstr = Split(tempstr, "$$")
        If UBound(atempstr) = 1 Then
        Me.c_oauth_token = atempstr(0)
        Me.c_oauth_token_secret = atempstr(1)
        End If
    End Function

    Public Function Get_access_token()
        Dim codeUrl As String, baseString As String, paraUrl As String
        Dim codeUrlTempalte As String
        Dim paraUrlTempalte As String
        Dim baseStringTemplate As String
        Dim tempstr As String

        codeUrlTempalte = "{0}?oauth_consumer_key={1}&oauth_nonce={2}&oauth_signature={5}&oauth_signature_method=HMAC-SHA1&oauth_timestamp={4}&oauth_token={6}&oauth_token_secret={7}&oauth_verifier={3}&oauth_version=1.0"
        paraUrlTempalte = "oauth_consumer_key={1}&oauth_nonce={2}&oauth_signature_method=HMAC-SHA1&oauth_timestamp={4}&oauth_token={6}&oauth_verifier={3}&oauth_version=1.0"
        baseStringTemplate = "{method}&{encode_tokenUrl}&{encode_paraUrl}" '用于生成signature

        oauth_nonce = makePassword(10)  '随机数
        oauth_timestamp = DateDiff("s", "01/01/1970 08:00:00", Now()) '邮戳

        paraUrl = Replace(paraUrlTempalte, "{1}", Me.c_App_Key) '参数串
        paraUrl = Replace(paraUrl, "{2}", oauth_nonce)
        paraUrl = Replace(paraUrl, "{3}", Me.c_oauth_verifier)
        paraUrl = Replace(paraUrl, "{4}", oauth_timestamp)
        paraUrl = Replace(paraUrl, "{6}", Me.c_oauth_token)
        paraUrl = Replace(paraUrl, "{7}", Me.c_oauth_token_secret)
        
        baseString = Replace(baseStringTemplate, "{method}", "GET")
        baseString = Replace(baseString, "{encode_tokenUrl}", strUrlEnCode(Me.c_tokenUrl))
        baseString = Replace(baseString, "{encode_paraUrl}", strUrlEnCode(paraUrl))
        
'        Debug.Print baseString
        oauth_signature = HAMC_SHA1(Me.c_App_Secret + "&" + Me.c_oauth_token_secret, baseString)
'        Debug.Print Me.c_App_Secret + "&" + Me.c_oauth_token_secret
'        MsgBox oauth_signature
        
        codeUrl = Replace(codeUrlTempalte, "{0}", Me.c_tokenUrl)
        codeUrl = Replace(codeUrl, "{1}", Me.c_App_Key)
        codeUrl = Replace(codeUrl, "{2}", oauth_nonce)
        codeUrl = Replace(codeUrl, "{3}", Me.c_oauth_verifier)
        codeUrl = Replace(codeUrl, "{4}", oauth_timestamp)
        codeUrl = Replace(codeUrl, "{5}", oauth_signature)
        codeUrl = Replace(codeUrl, "{6}", Me.c_oauth_token)
        codeUrl = Replace(codeUrl, "{7}", Me.c_oauth_token_secret)
'        Debug.Print codeUrl

'        Debug.Print Me.c_oauth_token_secret

        tempstr = httpGet(codeUrl)
        
        tempstr0 = tempstr
        tempstr0 = GetValue(tempstr0, "oauth_token\=(.*)?&oauth_token_secret\=(.*)?&", "0|1", False, False)
        atempstr = Split(tempstr0, "$$")
        If UBound(atempstr) = 1 Then
        Me.c_access_token = atempstr(0)
        Me.c_access_token_secret = atempstr(1)
        End If
        
        Get_access_token = tempstr
       
    End Function
Public Function Get_oAuth2()
        Dim codeUrl As String, baseString As String, paraUrl As String
        Dim codeUrlTempalte As String
        Dim paraUrlTempalte As String
        Dim baseStringTemplate As String
        Dim tempstr As String
        tokenUrl2 = "http://open.t.qq.com/api/auth/get_oauth2_token"
  codeUrlTempalte = "{0}?callbackurl=null&oauth_consumer_key={1}&oauth_nonce={2}&oauth_signature={5}&oauth_signature_method=HMAC-SHA1&oauth_timestamp={4}&oauth_token={6}&oauth_version=1.0"
 paraUrlTempalte = "callbackurl=null&oauth_consumer_key={1}&oauth_nonce={2}&oauth_signature_method=HMAC-SHA1&oauth_timestamp={4}&oauth_token={6}&oauth_version=1.0"
     'callbackurl=null&clientip=222.95.116.115&format=json&
        
        
        baseStringTemplate = "{method}&{encode_tokenUrl}&{encode_paraUrl}" '用于生成signature

        oauth_nonce = makePassword(10)  '随机数
        oauth_timestamp = DateDiff("s", "01/01/1970 08:00:00", Now()) '邮戳
        paraUrl = Replace(paraUrlTempalte, "{1}", Me.c_App_Key) '参数串
        paraUrl = Replace(paraUrl, "{2}", oauth_nonce)
        paraUrl = Replace(paraUrl, "{4}", oauth_timestamp)
        paraUrl = Replace(paraUrl, "{6}", Me.c_access_token)
          
        baseString = Replace(baseStringTemplate, "{method}", "GET")
        baseString = Replace(baseString, "{encode_tokenUrl}", strUrlEnCode(tokenUrl2))
        baseString = Replace(baseString, "{encode_paraUrl}", strUrlEnCode(paraUrl))
        
'        Debug.Print baseString
        oauth_signature = HAMC_SHA1(Me.c_App_Secret + "&" + Me.c_access_token_secret, baseString)
'        MsgBox Me.c_App_Secret + "&" + Me.c_oauth_token_secret
'        MsgBox oauth_signature
        
        codeUrl = Replace(codeUrlTempalte, "{0}", tokenUrl2)
        codeUrl = Replace(codeUrl, "{1}", Me.c_App_Key)
        codeUrl = Replace(codeUrl, "{2}", oauth_nonce)
        codeUrl = Replace(codeUrl, "{4}", oauth_timestamp)
        codeUrl = Replace(codeUrl, "{5}", oauth_signature)
        codeUrl = Replace(codeUrl, "{6}", Me.c_access_token)

'        Debug.Print codeUrl

'        Debug.Print Me.c_oauth_token_secret

        tempstr = httpGet(codeUrl)
        tempstr0 = tempstr
        
        errcode = GetValueFromJson(tempstr0, "errcode")
        If errcode = 0 Then
         Me.c_accesstoken2_0 = GetValueFromJson(tempstr0, "data.accesstoken")
         Me.c_expiretime2_0 = GetValueFromJson(tempstr0, "data.expiretime")
         Me.c_refreshtoken2_0 = GetValueFromJson(tempstr0, "data.refreshtoken")
         Me.c_getTokenTime = Now()
        End If
        
        Get_oAuth2 = tempstr
'        Debug.Print tempstr
'        Debug.Print Me.c_accesstoken2_0
End Function
Public Function Get_oAuth2ByRefreshToken()
If IsDate(Me.c_getTokenTime) = False Then
   Get_oAuth2ByRefreshToken = Get_oAuth2
 ElseIf DateDiff("s", Me.c_getTokenTime, Now()) - Me.c_expiretime2_0 > 0 Then
    Get_oAuth2ByRefreshToken = Get_oAuth2
 End If
End Function
Public Function Postpic(ByVal sUrl As String, Optional ByVal param As Dictionary, Optional ByVal useBaseUrl As Boolean) As String
      If useBaseUrl = True Then
      Call Get_oAuth2ByRefreshToken '如果到期再次授权
      sUrl = Replace(Me.c_baseUrl, "{0}", sUrl & "?oauth_consumer_key={1}&oauth_token={2}&oauth_version=2.0")
      End If
      
      sUrl = Replace(sUrl, "{1}", Me.c_App_Key)
      sUrl = Replace(sUrl, "{2}", Me.c_accesstoken2_0)
      
    Dim myUpload
    Set myUpload = New clsFileUpload
    With myUpload
    .c_strDestURL = sUrl
    Set .c_param = param
    .vbsUpload
    Postpic = .c_strResponseText
    'Debug.Print .c_strResponseText
    'Debug.Print .c_strErrMsg
    End With
    Set myUpload = Nothing

End Function

Public Function httpPost(ByVal sUrl As String, Optional ByVal param As Dictionary, Optional ByVal useBaseUrl As Boolean) As String
      If useBaseUrl = True Then
       Call Get_oAuth2ByRefreshToken '如果到期再次授权
      sUrl = Replace(Me.c_baseUrl, "{0}", sUrl & "?oauth_consumer_key={1}&oauth_token={2}&oauth_version=2.0")
      End If
      
      sUrl = Replace(sUrl, "{1}", Me.c_App_Key)
      sUrl = Replace(sUrl, "{2}", Me.c_accesstoken2_0)
      
      Dim http
      Set http = CreateObject("Msxml2.XMLHTTP")
      http.open "Post", sUrl, False
       http.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
      If param Is Nothing Then
       http.send
      Else
       http.send BuildPostContent(param)
      End If
      httpPost = http.responseText
      Set http = Nothing
'      Debug.Print sUrl
End Function



Public Function httpGet(ByVal sUrl As String, Optional ByVal param As Dictionary, Optional ByVal useBaseUrl As Boolean) As String
     If useBaseUrl = True Then
       Call Get_oAuth2ByRefreshToken '如果到期再次授权
      sUrl = Replace(Me.c_baseUrl, "{0}", sUrl & "?oauth_consumer_key={1}&oauth_token={2}&oauth_version=2.0")
      sUrl = Replace(sUrl, "{1}", Me.c_App_Key)
      sUrl = Replace(sUrl, "{2}", Me.c_accesstoken2_0)
      
      sUrl = sUrl & "&" & BuildPostContent(param)
      End If
      Dim http
      Set http = CreateObject("Msxml2.XMLHTTP")
      http.open "Get", sUrl, False
      http.send
      httpGet = http.responseText
      Set http = Nothing
End Function

Public Function BuildPostContent(ByVal p_param As Dictionary)
    Dim l As Integer, tempstr As String, PostContentTemplate As String, PostContent As String
    PostContent = ""
    PostContentTemplate = "{0}={1}"
    '排序
    Call SortDictionary(p_param, 1)
    l = p_param.Count
    For i = 0 To l - 1
        tempstr = Replace(PostContentTemplate, "{0}", p_param.Keys(i))
        tempstr = Replace(tempstr, "{1}", p_param.Items(i))
        PostContent = IIf(PostContent = "", tempstr, PostContent & "&" & tempstr)
        
    Next
    Set p_param = Nothing
    BuildPostContent = PostContent

'    Debug.Print PostContent
End Function

Public Function strUrlEnCode(ByVal strUrl)
strUrlEnCode = Replace(strUrl, "=", "%3D")
strUrlEnCode = Replace(strUrlEnCode, "&", "%26")
strUrlEnCode = Replace(strUrlEnCode, ":", "%3A")
strUrlEnCode = Replace(strUrlEnCode, "/", "%2F")
End Function


'腾讯1.0认证
Public Function httpGet1(ByVal sUrl As String, Optional ByVal param As Dictionary, Optional ByVal useBaseUrl As Boolean) As String '腾讯1.0
     If useBaseUrl = True Then
              oauth_nonce = makePassword(10)  '随机数
              oauth_timestamp = DateDiff("s", "01/01/1970 08:00:00", Now()) '邮戳
              
            With param
              .Add "oauth_consumer_key", Me.c_App_Key
              .Add "oauth_nonce", oauth_nonce
              .Add "oauth_signature_method", "HMAC-SHA1"
              .Add "oauth_timestamp", oauth_timestamp
              .Add "oauth_token", Me.c_access_token
              .Add "oauth_version", "1.0"
            End With
            Call SortDictionary(param, 1)
            paraUrl = BuildPostContent(param)
            baseUrl = Replace(Me.c_baseUrl, "{0}", sUrl)
      
        baseStringTemplate = "{method}&{encode_tokenUrl}&{encode_paraUrl}" '用于生成signature
        baseString = Replace(baseStringTemplate, "{method}", "GET")
        baseString = Replace(baseString, "{encode_tokenUrl}", strUrlEnCode(baseUrl))
        baseString = Replace(baseString, "{encode_paraUrl}", strUrlEnCode(paraUrl))
        oauth_signature = HAMC_SHA1(Me.c_App_Secret + "&" + Me.c_access_token_secret, baseString)
'Debug.Print baseString
        With param
        .Add "oauth_signature", oauth_signature
        End With
         Call SortDictionary(param, 1)
         paraUrl = BuildPostContent(param)
       sUrl = baseUrl & "?" & paraUrl
      End If
      

      Dim http
      Set http = CreateObject("Msxml2.XMLHTTP")
      http.open "Get", sUrl, False
      http.send
      httpGet1 = http.responseText
      Set http = Nothing

End Function
Public Function httpPost1(ByVal sUrl As String, Optional ByVal param As Dictionary, Optional ByVal useBaseUrl As Boolean) As String
     If useBaseUrl = True Then
          oauth_nonce = makePassword(10)  '随机数
          oauth_timestamp = DateDiff("s", "01/01/1970 08:00:00", Now()) '邮戳
          
        With param
          .Add "oauth_consumer_key", Me.c_App_Key
          .Add "oauth_nonce", oauth_nonce
          .Add "oauth_signature_method", "HMAC-SHA1"
          .Add "oauth_timestamp", oauth_timestamp
          .Add "oauth_token", Me.c_access_token
          .Add "oauth_version", "1.0"
        End With
        Call SortDictionary(param, 1)
        paraUrl = BuildPostContent(param)
        baseUrl = Replace(Me.c_baseUrl, "{0}", sUrl)
      
        baseStringTemplate = "{method}&{encode_tokenUrl}&{encode_paraUrl}" '用于生成signature
        baseString = Replace(baseStringTemplate, "{method}", "POST")
        baseString = Replace(baseString, "{encode_tokenUrl}", strUrlEnCode(baseUrl))
        baseString = Replace(baseString, "{encode_paraUrl}", strUrlEnCode(paraUrl))
        oauth_signature = HAMC_SHA1(Me.c_App_Secret + "&" + Me.c_access_token_secret, baseString)
'Debug.Print baseString
        With param
        .Add "oauth_signature", oauth_signature
        End With
         Call SortDictionary(param, 1)
         paraUrl = BuildPostContent(param)
       sUrl = baseUrl '& "?" & paraUrl
      End If
      
      Dim http
      Set http = CreateObject("Msxml2.XMLHTTP")
      http.open "Post", sUrl, False
       http.setRequestHeader "Content-Type", "application/x-www-form-urlencoded"
      If param Is Nothing Then
       http.send
      Else
       http.send paraUrl
      End If
      httpPost1 = http.responseText
      Set http = Nothing
'      Debug.Print sUrl
End Function
'1.0发图片还是提示签名错误,但我计算的结果和腾讯给的在线调试工具计算的结果是一致的,不知道原因 ,也不用管了,腾讯都已经在测试2.0的授权了,淘汰1.0是迟早的事情,这一点,腾讯走得太慢了,小企鹅变成懒企鹅了
Public Function Postpic1(ByVal sUrl As String, Optional ByVal param As Dictionary, Optional ByVal useBaseUrl As Boolean) As String
     If useBaseUrl = True Then
          oauth_nonce = makePassword(10) '随机数
          oauth_timestamp = DateDiff("s", "01/01/1970 08:00:00", Now())  '邮戳
          
        With param
          .Add "oauth_consumer_key", Me.c_App_Key
          .Add "oauth_nonce", oauth_nonce
          .Add "oauth_signature_method", "HMAC-SHA1"
          .Add "oauth_timestamp", oauth_timestamp
          .Add "oauth_token", Me.c_access_token
          .Add "oauth_version", "1.0"
          
          
          '把pic 弄出来
          picpath = .Item("pic")
          .Remove ("pic")
        End With
        Call SortDictionary(param, 1)
        paraUrl = BuildPostContent(param)
        baseUrl = Replace(Me.c_baseUrl, "{0}", sUrl)
      
        baseStringTemplate = "{method}&{encode_tokenUrl}&{encode_paraUrl}" '用于生成signature
        baseString = Replace(baseStringTemplate, "{method}", "POST")
        baseString = Replace(baseString, "{encode_tokenUrl}", strUrlEnCode(baseUrl))
        baseString = Replace(baseString, "{encode_paraUrl}", strUrlEnCode(paraUrl))
        oauth_signature = HAMC_SHA1(Me.c_App_Secret + "&" + Me.c_access_token_secret, baseString)
'        Debug.Print baseString
        With param
        .Add "oauth_signature", oauth_signature
'        .Add "pic", Split(picpath, "|")(2)
        End With
         Call SortDictionary(param, 1)
         paraUrl = BuildPostContent(param)
       sUrl = baseUrl & "?" & paraUrl '"format=json&content=good&clientip=49.74.73.203&jing=11&wei=18&pic=c:\13.jpg&syncflag=0" '
      End If
      Debug.Print sUrl
      '把pic加上
'       param.Remove ("pic")
    param.Add "pic", picpath

'     Call SortDictionary(param, 1)
'For i = 0 To param.Count - 1
'Debug.Print param.Keys(i) & "=" & param.Items(i)
'Next


    Dim myUpload
    Set myUpload = New clsFileUpload
    With myUpload
    .c_strDestURL = sUrl
    Set .c_param = param
    .vbsUpload
    Postpic1 = .c_strResponseText
    'Debug.Print .c_strResponseText
    'Debug.Print .c_strErrMsg
    End With
    Set myUpload = Nothing

End Function
'1.0核心函数结束


'说明:Dictionary排序
'参数:
'   objDict:Dictionary对象
'   intSort: 1 根据key排序; 2 根据value排序
Function SortDictionary(objDict, intSort)
  ' declare our variables
  Dim strDict()
  Dim objKey
  Dim strKey, strItem
  Dim x, Y, Z

  ' get the dictionary count
  Z = objDict.Count

  ' we need more than one item to warrant sorting
  If Z > 1 Then
    ' create an array to store dictionary information
    ReDim strDict(Z, 2)
    x = 0
    ' populate the string array
    For Each objKey In objDict
        strDict(x, 1) = CStr(objKey)
        strDict(x, 2) = CStr(objDict(objKey))
        x = x + 1
    Next

    ' perform a a shell sort of the string array
    For x = 0 To (Z - 2)
      For Y = x To (Z - 1)
        If StrComp(strDict(x, intSort), strDict(Y, intSort), vbTextCompare) > 0 Then
            strKey = strDict(x, 1)
            strItem = strDict(x, 2)
            strDict(x, 1) = strDict(Y, 1)
            strDict(x, 2) = strDict(Y, 2)
            strDict(Y, 1) = strKey
            strDict(Y, 2) = strItem
        End If
      Next
    Next

    ' erase the contents of the dictionary object
    objDict.RemoveAll

    ' repopulate the dictionary with the sorted information
    For x = 0 To (Z - 1)
      objDict.Add strDict(x, 1), strDict(x, 2)
    Next

  End If

End Function

 

0
0
分享到:
评论

相关推荐

    腾讯微博API_SDK_PHP示例

    在使用腾讯微博API SDK for PHP时,你需要了解以下几个核心知识点: 1. **OAuth认证**:腾讯微博API使用OAuth 2.0进行授权,这是互联网上广泛采用的一种安全授权协议。开发者需要先注册应用获取App Key和App Secret...

    android模仿腾讯微博项目源码

    在Android平台上,模仿腾讯微博项目是一项综合性的任务,涉及到许多Android开发的核心技术和组件。这个项目旨在帮助开发者理解和实现一个类似腾讯微博的应用程序,提供社交网络的功能。以下将详细阐述此项目涉及的...

    腾讯微博客户端源码

    腾讯微博客户端源码是一个宝贵的学习资源,特别是对于那些想要深入理解客户端应用开发的开发者来说。这个源码提供了关于如何构建一个完整的社交网络客户端的详细实现,涵盖了从用户界面设计到网络通信、数据管理等多...

    QT腾讯微博客户端

    在"QT腾讯微博客户端"这个项目中,开发者利用Qt的网络模块实现了对腾讯微博API的调用。腾讯微博提供了一系列的RESTful API,允许第三方应用获取和发布微博信息、关注好友动态、评论和转发等功能。开发者需要理解这些...

    易语言腾讯微博批量发表

    在了解这款源码之前,我们首先需要熟悉易语言的基础知识和腾讯微博的相关API。 易语言是一种面向对象、可视化、组件化的编程语言,其设计目标是使非专业程序员也能轻松进行程序开发。易语言采用了贴近自然语言的...

    android仿腾讯微博客户端

    2. 数据获取与展示:微博内容的获取主要依赖于腾讯微博API,如获取用户的时间线、热门微博等。使用Android的RecyclerView组件展示列表,结合Gson库解析JSON数据,实现动态加载和下拉刷新功能。 3. 图片加载:微博中...

    易语言腾讯微博批量广播

    《易语言腾讯微博批量广播:实现与技术剖析》 易语言是一种中文编程语言,它以其直观易懂的语法设计,让编程变得更加简单。在“易语言腾讯微博批量广播”项目中,开发者使用易语言实现了对腾讯微博的批量广播功能,...

    新浪腾讯微博分享demo

    总结一下,"新浪腾讯微博分享demo"主要涵盖了OAuth 2.0授权流程、微博API的使用、分享功能的实现,以及用户体验设计。通过这个demo,开发者能够学习到如何在移动或Web应用中集成微博分享,为用户提供方便快捷的社交...

    易语言腾讯微博批量发表源码.7z

    1. **网络通信**:在易语言中,可以通过内置的网络模块进行HTTP请求,实现与腾讯微博服务器的通信。这包括发送登录请求、获取认证Token、发布微博等操作。你需要了解HTTP协议的基础知识,以及如何构建POST或GET请求...

    腾讯微博任务

    API(Application Programming Interface)是软件之间交互的桥梁,此文件可能封装了调用腾讯微博API的代码,使得软件能执行登录、发布评论等操作。 3. **spec.fne**:这个名字可能是“规范”或“特殊”之意,这可能...

    android腾讯微博的源代码

    网络通信是微博应用的核心部分,腾讯微博使用HTTP协议与服务器交互,可能涉及到JSON或XML数据的解析。开发者可以从中学习如何使用Android的HttpURLConnection或者第三方库如Volley、Retrofit等进行网络请求,以及...

    e语言-腾讯微博批量广播

    在本例程中,易语言的核心特性得到了充分展示,开发者通过易语言的模块化设计,构建了腾讯微博批量广播的功能。 多线程技术在该程序中起到了关键作用。多线程允许程序同时执行多个任务,这样在批量广播时,可以同时...

    2011年沈大海讲师Android的腾讯微博客户端认证源代码

    3. **网络请求**:可能使用了HTTP请求库,如HttpURLConnection或OkHttp,来与腾讯微博的API进行通信,获取和发送数据。 4. **JSON解析**:由于网络请求的结果通常是JSON格式,所以需要了解如何使用Gson或Jackson库...

    基于Android的腾讯微博app

    【基于Android的腾讯微博app】项目是一个使用Android Studio开发的移动应用示例,旨在帮助开发者了解如何构建一个功能完备的社交媒体应用,特别是针对腾讯微博的客户端。该项目包含了一个完整的应用程序框架,包括...

    Android 腾讯微博客户端源码.zip

    10. **社交功能实现**:腾讯微博客户端的核心功能,如发布、转发、评论、点赞,这些都需要实现复杂的业务逻辑,源码中会展示如何处理用户交互和社交数据的同步。 通过深入研究这份源码,开发者不仅可以提升Android...

    IOS sina 腾讯 微博 Oauth2.0 授权DEMO

    在实现这个功能时,开发者需要遵循腾讯微博的API文档,处理好授权请求和响应,以及正确构建和发送分享内容的请求。 总结起来,这个DEMO涵盖了以下几个关键知识点: 1. OAuth2.0授权流程:了解如何获取和使用授权码...

    Android应用源码腾讯微博安卓客户端项目

    网络通信是现代移动应用的核心,腾讯微博客户端必然采用了某种网络库,如Retrofit或Volley,用于与服务器交互。通过分析源码,开发者可以学习到如何处理HTTP请求、JSON解析、错误处理等网络编程技术。 数据持久化...

    仿weicoco微博客服端

    【标题】"仿weicoco微博客服端"指的是一个基于腾讯微博API开发的第三方微博客户端应用,其设计和功能上模仿了知名的微博客户端Weico。这个应用旨在为用户提供与Weico相似的微博浏览、发布、互动体验,但可能在界面...

    MicroBlog微博

    MicroBlog是一款基于腾讯微博开放平台构建的应用,旨在为用户提供便捷、个性化的微博服务。微博作为一种社交媒体形式,已经成为人们分享生活、交流观点的重要平台。这款应用的开发,充分利用了腾讯微博的API接口,...

Global site tag (gtag.js) - Google Analytics