This allows you to download posts from a Google Plus feed without requiring the user to log in. Useful for changelogs that update far too often to bother putting them on the Android Marketplace
Requires HttpUtils
Usage:
You must set GPlus.APIkey to your Google API key
To download the main posts feed:
HttpUtils.Download("plus", GPlus.PostsURL(PlusID, ""))
Where "plus" is the HttpUtils job name (you can change this), and PlusID is the ID of the feed
in your GENERATEYOURHTML sub,
That code will parse the downloaded file to get the posts, then it's as simple as enumerating through GPlus.CwActivity
Requires HttpUtils
Usage:
You must set GPlus.APIkey to your Google API key
To download the main posts feed:
HttpUtils.Download("plus", GPlus.PostsURL(PlusID, ""))
Where "plus" is the HttpUtils job name (you can change this), and PlusID is the ID of the feed
B4X:
Sub JobDone (Job As String)
Select Case Job
Case "plusreplies"
If GPlus.ParseReplies("", GPlus.CwActivity , GPlus.CwReply, True) then GENERATEYOURHTML
Case "plus"
If HttpUtils.SuccessfulUrls.Size>0 Then
GPlus.GetReplies(GPlus.CwActivity)
GENERATEYOURHTML
end if
in your GENERATEYOURHTML sub,
B4X:
If GPlus.NeedsParsing Then
tempstr=HttpUtils.GetString( GPlus.PostsURL(PlusID,PageToken) )' HttpUtils.GetString( HttpUtils.SuccessfulUrls.GetKeyAt(0) )
INI=GPlus.ParseActivityFeed(tempstr)
GPlus.CwActivity = GPlus.EnumActivities(INI)
End If
That code will parse the downloaded file to get the posts, then it's as simple as enumerating through GPlus.CwActivity
Attachments
Last edited: