I''m following this Tutorial but so far I can't make it work, though this is from a year ago or so...
I'm using androidStudo 1.2.2 and FacebookSDK 4.
I want a simple login into facebook using a custom button, like the one shown in this image:
Now, in the example from the tutorial I'm having problems with the Session
variable, it says it cannot resolve it, neither getActivity()
Has naybody tried this on FacebookSDK4.0?
Is that a correct approach or maybe there is something more updated?
Thanks in advance!
This is very simple. Add a button in the layout file like
And in the onClick place the LoginManager's registercallback() method Becuse the this method automatically executes.
like:
Have Fun