Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

AppGameKit Classic Chat / Facebook Post To Friends Wall

Author
Message
Naphier
15
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 12th Dec 2013 14:47
So, this works, but every time I use it it asks me to log in to Facebook, even if I just logged in and approved the app.
Am I doing something wrong?
It's really going to slow down my users if they have to log in a second time to post to their friends wall...
All suggestions welcome!

Naphier
15
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 13th Dec 2013 20:28
I tried an alternative using FB's url to post on someone's wall, but that's not really acceptable either as it still asks for the user to log in unless they've logged in via their phone's web browser...

ManOfActionTM
15
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 9th Apr 2014 05:52
Hey Naphier, did you ever solve this?
Naphier
15
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 9th Apr 2014 05:56
No, unfortunately AGK's implementation of Facebook does not ask for permissions correctly.
So when they sign in for a FB login they will approve the app with no special permissions. The app needs to be approved for "posting on your behalf".
After I get Chartboost working completely my next task is the try to fix AGK's Facebook implementation.
I think that if you just want to post to wall then you can just do the Facebook setup for the app and call post to wall. That way they're only asked once to sign in, but if you need other FB features like FB login and getting friends lists then you need to have them sign in twice.
I'll report back in a month or so when I get it working more fluidly.

xGEKKOx
AGK Master
17
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 9th Apr 2014 06:08 Edited at: 9th Apr 2014 06:09
Are you testing on iOS or Android? ...as Facebook updated his API many times since the AppGameKit Facebook features are introduced, this is the reason i use OBJ C in iOS with the latest Facebook API.

Long life to Steve!
ManOfActionTM
15
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 9th Apr 2014 06:14
Naphire, all we want to do is post to the user's wall, not to their friends' walls.

xGEKKOx, that's how I stumbled onto this subject. I was starting to put in facebook functionality and saw the commands, and the arguments they took, but there was no description in the documentation about what the commands were! So I was hoping someone had an answer, and here I am.

Would it be easier just to use HTTP commands? Or would that open up new problems?
Naphier
15
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 9th Apr 2014 06:20 Edited at: 9th Apr 2014 06:21
I've no idea what SDK version AppGameKit is using in their setup...
I do doubt it has been updated.

Posting to your own wall may have the same issue, I'm not sure.
Basically when AppGameKit first set these commands up allowing an app to post on your wall or your friend's wall was part of the standard permission set.
Now it isn't and has to be explicitly asked for. You can probably thank Zynga for that.

Even FB's instructions on setting the permissions are FAR off from what AppGameKit has set up so I'm guessing this would also require and SDK update and a full rewrite of AGK's implementation of Facebook.
I brought this issue to Paul's attention months ago and by his response it sounded like they were not going to do anything about it
However, if others chime in then maybe we can get some results?

HTTP commands will not solve your issue.
You can post to wall by URL, but that needs the OpenBrowser command and on Android it still does not open the Facebook app yet. For some reason FB has decided not to grab URLs in Android to ask if they should be opened in the FB app.

ManOfActionTM
15
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 9th Apr 2014 06:27
Hmmm, so marketing through FB has been curtailed by Zynga...bastards!

Yeah, I meant URL, but was thinking HTTP for some reason.

Well, I guess I will be learning some objective C just to put facebook commands in--that's what I want to do next month How much different is it than regular C/C++?

Oh, forgot to answer xGEKKOx's question: We will be attempting to do both, but starting with iOS first.
xCept
23
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 9th Apr 2014 06:42 Edited at: 9th Apr 2014 06:45
The integrated social features of AppGameKit have always been insufficient in my opinion. I know TGC used it themselves in some of their own apps, including Hide It Find It, but it's definitely a burden to get working from my own experience. (I believe the included FB SDK for iOS hasn't been touched since 2012, putting it at least 13 major revisions behind).

For iOS there is a wonderful open source share kit (aptly titled Share Kit) that allows easy sharing among all the major networks. Even if you know very little Objective C it is easy to integrate, however I've never personally tied it to AppGameKit projects.

This is the greatest risk of supporting AppGameKit, which is closed source and does not support third party extensions. As such, all updates must be completed by Paul, with social media and other third party libraries changing much faster than the pace of AppGameKit updates. The ShareKit library, for instance, has had over 1340 updates since the beginning, including just a couple days ago, to make sure all facets are up-to-date. AppGameKit has had a couple within that same period.
ManOfActionTM
15
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 9th Apr 2014 06:43
So it sounds like 3rd party is the way to go for social networking stuff.

Thanks everyone!
Naphier
15
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 9th Apr 2014 06:54
Yeah looks like FB SDK in Android projects are from 2012 too...
The biggest difficulty with Android and AppGameKit is that all of AGK's stuff has to run on a thread because of NDK. I'm still trying to work out when to use Runnable classes vs. looper methods.
AGK's implementations are also far from clean and the comments are misleading and sometimes just incorrect.

ManOfActionTM
15
Years of Service
User Offline
Joined: 16th May 2011
Location: Sahuarita, Arizona
Posted: 9th Apr 2014 07:02
sounds like all sorts of fun coming up
Digital Awakening
AGK Developer
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 9th Apr 2014 22:42
It's not part of the AppGameKit v2 roadmap. I guess people were not interested in these things back when TGC did the community poll. That's pretty outdated now I think. I wish TGC would implement social features rather than 3D.

Naphier
15
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 9th Apr 2014 23:10
3D support was the bottom of my list for features!

xCept
23
Years of Service
User Offline
Joined: 15th Dec 2002
Location:
Posted: 10th Apr 2014 07:16
Quote: "It's not part of the AppGameKit v2 roadmap. I guess people were not interested in these things back when TGC did the community poll. That's pretty outdated now I think. I wish TGC would implement social features rather than 3D."


Well, there actually was interest. However, for whatever reason social networking was not one of the options available in the survey Rick sent out. Before the survey, when Rick was soliciting suggestions, multiple users mentioned it--social network improvements was also #1 in my list of requests.
Naphier
15
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 10th Apr 2014 07:18
I put it in the Google code project.
I think that it would help if others voiced there desires for this to be fixed/updated there.
Social improvements were also big on my list.
https://code.google.com/p/agk/issues/detail?id=640

JohnnyMeek
13
Years of Service
User Offline
Joined: 23rd Apr 2013
Location: Slovenia
Posted: 10th Apr 2014 11:14
Added my comment to this issue on google code. For me this is one of the most important features we need updating. Social, Ads, Analytics. The backbone of every successful mobile app in the stores.
Digital Awakening
AGK Developer
23
Years of Service
User Offline
Joined: 27th Aug 2002
Location: Sweden
Posted: 10th Apr 2014 11:16
Added my vote!

Naphier
15
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 10th Apr 2014 18:29
@ xCept
So I was just looking over the survey results and I have to say I'm disappointed on how off the mark they are for AppGameKit v2.
Spine support came in with 60% in the very low and low category yet seems to have been a major focus.
Ouya support was 54% very low/low to 45% high/very high. Yet has been a major focus.
Compiler only including required libraries was overwhelmingly desired, but no mention of it in roadmap.
Game Centre style system was highly desired, but there's been no mention of adding Google Play Game services.
Built in GUI was highly desired, but no mention of that in the AppGameKit roadmap.
There was an overwhelming desire for HTML5 support too and that lead nowhere.
Why they completely ignored asking about better social feature integration is beyond me.
rabble rabble rabble

Naphier
15
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 6th May 2014 04:02
I fixed it!

So this requires a few steps. Simple and AppGameKit should implement them. I'll let Paul know because it doesn't require an SDK update just some extra code.
So in a nutshell what is happening is that there is NO facebook session passed to the RunnableFacebook class in AGKHelper. I've not dug in to iOS, but it doesn't seem to be an issue there.

To fix you'll first need to pass the facebook session object to the RunnableFacebook class like so:
In AGKHelper.java in the AGKHelper class there is the FacebookPost() method. After the line that reads
feed.act = act;
add
feed.session = Session.getActiveSession();
(Eclipse will complain a bit, but we'll fix that momentarily)

Next go to the RunnableFacebook class in AGKHelper.java (up near the top). In the variable decalrations type in
public Session session;
In the run() method add this code before feed.dialog


What that does is it explicitly asks for publishing permission (required by Facebook otherwise what you publish with your app runs the risk of being published privately to the user...). The user will see a permission authorization dialogue saying the app wants to post on their behalf. Then it sets the session for feed to be the active session for Facebook. So to ensure this works you'll likely need to call FacebookLogin() right before you go to post. That way you are ensured that there is an active Facebook session. Unfortunately Facebook does not allow for you to ask for publish permissions at the same time you ask for log in permissions so there will always be that second authorization request for first-time users.

I've tested about a dozen times and it works quite well

xGEKKOx
AGK Master
17
Years of Service
User Offline
Joined: 7th Dec 2008
Location: Italy
Posted: 6th May 2014 04:48
If you want to use on iOS, you need to keep some of my code on the template i released in the iOS section.

I updated my personal Facebook integration about 40 times to be always updated.
I use it to give the possibility to users to invite friends to get some additional features.

Of course posting the score on the wall and on the friends wall.

It's really complicated if you don't use a template like mine, where you share the UntitledViewController in the c++ part.

Anyway, look at my code, and you will understand.

Long life to Steve!
Naphier
15
Years of Service
User Offline
Joined: 2nd Oct 2010
Location: St Petersburg, Florida
Posted: 6th May 2014 04:50
I see no reason to update anything with iOS for this as it works perfectly fine out of the box.

Login to post a reply

Server time is: 2026-07-28 02:47:04
Your offset time is: 2026-07-28 02:47:04