Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Java Development

Reply
Regular Contributor
milan555
Posts: 52
Registered: ‎07-04-2011
My Device: Bold-3

Facebook integration

[ Edited ]

I try to post on facebook from my simulator.

I am using below code .

I am not getting error but I didnt able to post my message on facebook.

Below is my code.

Please help to to correct my code.

 

String NEXT_URL = "http://www.facebook.com/connect/login_success.html";
String APPLICATION_ID = "303038066xxxxx";
String APPLICATION_SECRET = "e9282d766301cb0476e91xxxxxxxx";
String[] PERMISSIONS = Facebook.Permissions.USER_DATA_PERMISSIONS;

ApplicationSettings as = new ApplicationSettings(NEXT_URL, APPLICATION_ID,
APPLICATION_SECRET, PERMISSIONS);

Facebook fb = Facebook.getInstance(as);

User user;

 

user = fb.getCurrentUser();

fb.getCurrentUser(new BasicAsyncCallback() {

public void onComplete(
com.blackberry.facebook.inf.Object[] objects,
final java.lang.Object state) {

user = (User) objects[0];
user.publishStatus("Hello world!");
System.out.println("Done");
}

public void onException(final Exception e,
final java.lang.Object state) {

System.out.println("Error : " + e.getMessage());
}
});

} catch (FacebookException e) {
System.out.println("Error : " + e.getMessage());
}

Regular Contributor
milan555
Posts: 52
Registered: ‎07-04-2011
My Device: Bold-3

Re: Facebook integration

Can any one please help me to post message on facebook page from my application ?

 

Thanks,

Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: Facebook integration

Have you tested 'strawberry', the sample test application that comes with the Facebook SDK? 

Regular Contributor
milan555
Posts: 52
Registered: ‎07-04-2011
My Device: Bold-3

Re: Facebook integration

no,
can you please provide me link of it ?
Regards,
Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: Facebook integration

Regular Contributor
milan555
Posts: 52
Registered: ‎07-04-2011
My Device: Bold-3

Re: Facebook integration

Hi,

Thanks for link.

But it did not work for OS 7.0 and above.

So, do you have any idea about OS 7.0 and above that how could I integrate facebook in OS 7.0 above applications?

 

Regards,

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Facebook integration

could you specify "did not work"?
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Regular Contributor
milan555
Posts: 52
Registered: ‎07-04-2011
My Device: Bold-3

Re: Facebook integration

Hi,

Thanks for reply.

I have downloaded Facebook SDK from here : http://devblog.blackberry.com/2010/09/facebook-sdk/

That worked for os 5 and os 6. But the same SDK not working for os 7.0

So What I have to do to integrate Facebook for os 7.0 and os 7.1?

 

Regards,

 

 

 

Developer
simon_hain
Posts: 16,282
Registered: ‎07-29-2008
My Device: Z10 LE, Z30, Passport

Re: Facebook integration

did you use the strawberry sample application?
i did not have any issues on 7.1 the last time i tested it (which is quite some time ago)
----------------------------------------------------------
feel free to press the like button on the right side to thank the user that helped you.
please mark posts as solved if you found a solution.
@SimonHain on twitter
Developer
peter_strange
Posts: 19,610
Registered: ‎07-14-2008
My Device: Not Specified

Re: Facebook integration

I have tested it recently and also did not have a problem.