iOS Question intent phone,mail,share....

ivanomonti

Well-Known Member
Licensed User
Hi, community b4i

can start by calling code, the same for email, share, map!
 

ivanomonti

Well-Known Member
Licensed User
hi,
I do not know if questop may be right to publish a post in your facebook page

B4X:
dim s as string = "fb://publish/profile/#me?text=I love b4i"
CallFacebookPublish(s)

B4X:
Sub CallFacebookPublish(s As String)
    Dim app As Application
    If app.CanOpenUrl(s) Then app.OpenUrl(s)
End Sub

result null :-(
 
Upvote 0

ivanomonti

Well-Known Member
Licensed User
following commands scheme fb, I can not send post

problem > app.CanOpenUrl(s) = false ???

B4X:
        ' facebook = fb://publish/?text=posso ospitare cani di media e grande taglia presso la mia abitazione publicato su job2go il 25112014140556

        Dim s As String = "fb://publish/?text=" & colRoot.Get(3) & """ publicato su job2go il "  & colRoot.Get(13)
        CallFacebookPublish(s)


B4X:
Sub CallFacebookPublish(s As String)
    Dim app As Application
    If app.CanOpenUrl(s) Then
        app.OpenUrl(s)
    Else
        Dim mhud As HUD
        mhud.ToastMessageShow(s,True)
    End If
End Sub
 
Upvote 0

ivanomonti

Well-Known Member
Licensed User
HI,

using all of the examples, the pattern fb does not pass, it always returns false

B4X:
Dim s As String = "fb://publish/profile/me?text=" & colRoot.Get(3) & " publicato su job2go il "  & colRoot.Get(13)
CallFacebookPublish(s)

Sub CallFacebookPublish(s As String)
   Dim app As Application
   If app.CanOpenUrl(s) Then
     app.OpenUrl(s)
   Else
     Dim mhud As HUD
     mhud.ToastMessageShow(s,True)
   End If
End Sub

app = Not initialized. :mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad:
 
Last edited:
Upvote 0

ivanomonti

Well-Known Member
Licensed User
yes, Facebook and messanger

10628160_808245855906189_3989265592669043120_n.jpg
 
Upvote 0

ivanomonti

Well-Known Member
Licensed User
Also putting the url encoding same problem

app = Not initialized. :mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad::mad:

B4X:
Sub CallFacebookPublish(s As String)
   Dim su As StringUtils
   s = su.EncodeUrl(s,"UTF8")
   Dim app As Application
   If app.CanOpenUrl(s) Then
     app.OpenUrl(s)
   Else
     Dim mhud As HUD
     mhud.ToastMessageShow(s,True)
   End If
End Sub
 
Upvote 0

ivanomonti

Well-Known Member
Licensed User
I can not explain Erel, all commands fb:// do not go, as if they were incompatible
 
Upvote 0

valentino s

Active Member
Licensed User
I've made this two working tests:

B4X:
WebView1.LoadHtml("<a href='fb://profile'>test</a>")

and

B4X:
App.OpenUrl("fb://profile")

fb://post/ doesn't work as it is written here: http://wiki.akosma.com/IPhone_URL_Schemes

However this works:
B4X:
WebView1.LoadHtml("<a href='https://www.facebook.com/sharer/sharer.php?u=encodedurl&t=encodedtext'>test</a>")
 
Upvote 0
Top