B4A Library Facebook

leitor79

Active Member
Licensed User
Longtime User

Hi, NJ!

You mean copying the text I've tried after "v2.0/" (ex.: "me?fields=id,name") into the "Request" parameter of the customrequest function?


Thank you very much!
 

leitor79

Active Member
Licensed User
Longtime User
Hi,

I can't manage to make invitations using this library. The invites are for games (my app is not) and using the customrequest I can't use this and the PostToTimeline doesn't work (I'm trying to post on my own wall):

FB.PostToTimeline( "me","this is a test", "http://www.google.com")

That does nothing. Just black screen. I'm using this permissions (more than I need, I know):


Any ideas?

Thank you!
 

NJDude

Expert
Licensed User
Longtime User
You cannot send invitations via the API, it says it on the page:

This line works:
B4X:
FB.PostToTimeline( "me","this is a test", "http://www.google.com")
After posting a message ID will be returned in the following event:
B4X:
PostToTimeline_Response(MessageID As String)
Have you added that?
 

leitor79

Active Member
Licensed User
Longtime User

Hi NJ,

Thanks for your answer. I did not tried capturing the response, I've done it now, but nothing happens. But I've seen the examples again and I've noticed the ErrorMessages event, I've captured that and I get an error:

(#200) The user hasn't authorized the application to perform this action

I'm not sure if this has something to do with your library. I've read many many pages, changed a lot of app settings, I've only get to change the error message (like "API calls from the server require an appsecret_proof argument") but I could never managed to post on my timeline. It's over a week I'm on this problem, "downgrading" my solution (from getting a list of users to invite, to post on my wall, passing by sending a message to one user at a time) because nothing of this works (not your fault), and before giving up and start over this project on eclipse and android api I'm asking if maybe other facebook user has encountered this problem and how could he/she solved it.

Thank you very much!
 

leitor79

Active Member
Licensed User
Longtime User
Hi,

I've made the PostToTimeline to work.

The thing I was doing wrong was to put all the code on the same event. For testing purposes, I had from the login to the PostToTimeLine code all together. I suppose that there is required to do some process after authentication that takes some time and my app did not wait for it.

Thanks NJ for your help anyway!
 

asales

Expert
Licensed User
Longtime User
Hello NJDude.

After login the app shows the first page of my site configured in "Valid OAuth redirect URIs" of Facebook and in the variable "Private myWebsite As String" of the app.
It is possible to disable it and after login returns to the main form of app?
 

NJDude

Expert
Licensed User
Longtime User
I'm not sure I understand what you want, but you cannot alter the login sequence, however, you could query if the user is logged in or not using "IsUserLoggedIn" and do whatever you need.
 
Last edited:

asales

Expert
Licensed User
Longtime User
Hi NJDude, Thanks.
The login sequence is: (1) insert user and password, (2) click in the login button, (3) show Facebook permissions to authorize, (4) the app show the homepage of my site and (5) returns to the main screen of app.
I want to disable the item 4: "show the homepage of my site".
It's possible?
 

leitor79

Active Member
Licensed User
Longtime User
The issue AS2 describes happens to me too. After the user press the login button on the facebook login window, the site configured on the site url is shown for a second or two....

Regards,
 

NJDude

Expert
Licensed User
Longtime User
Yes, that's supposed to happen, that's how the API works, however, you could point the URL to a blank html document, something like:
B4X:
http://www.yourwebsite.com/dummy.html
It will still show for a second but you will see just a blank screen.
 

brelto85

Active Member
Licensed User
Longtime User
after called the LogIn method, returns the following error:

"Please verify you have internet Access"

The data connection is active
Where is the problem?
 

brelto85

Active Member
Licensed User
Longtime User
yes, AppID AppSecret e WebSite are correctly setted
the login page and the facebook permissions page are shown correctly and the login flow works correctly
After that, the IsUserLoggedIn property are setted correctly but after show the message error
 

brelto85

Active Member
Licensed User
Longtime User

also the edwar8405 have the same error
 

NJDude

Expert
Licensed User
Longtime User
Well, on the post you indicate, he's done something, no idea what, therefore my answer on the next post, in your case, I don't know what is the problem, unless you've done something you're not telling me.
 
Cookies are required to use this site. You must accept them to continue using the site. Learn more…