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
New Developer
Posts: 18
Registered: ‎08-27-2010
My Device: Torch
My Carrier: Rogers

Re: Connect to facebook api in blackberry

While the StrawBerry project did work fine for me once I changed it to use WiFi (my Torch doesn't have a SIM), when I include the code in my app it fails when creating the Logger. 

 

I had tried the original code before the newest incarnation and I couldn't even get the StrawBerry app to work at all.

Retired
Posts: 48
Registered: ‎12-15-2008
My Device: Not Specified

Re: Connect to facebook api in blackberry

can you be more specific please?

what is/are the exception(s) that you are seeing?

Best Regards,
David Lim(林玮)


BlackBerry App World:
http://www.blackberry.com/appworld

BlackBerry Developer Zone:
http://www.blackberry.com/developers
Regular Visitor
Posts: 1
Registered: ‎11-23-2010
My Device: Not Specified

Re: Connect to facebook api in blackberry

 

sometime when i login it return white screen, when i can login but i can't post to my wall
2010-11-24 03:49:34 [DEBUG] con = net.rim.device.cldc.io.devicehttps.ClientProtocol@60f70226
2010-11-24 03:49:34 [DEBUG] url = https://graph.facebook.com/me/feed;deviceside=true
2010-11-24 03:49:34 [ERROR] Empty response

 

this text show in debug. I can use this facebook sdk in the other program and it work fine.

 

Developer
Posts: 237
Registered: ‎05-07-2010
My Device: 8520
My Carrier: Internet

Re: Connect to facebook api in blackberry

i have same problem as you.

 

First 4 or 5 times wallpost works but after that i didnt.

 

so i have tried update status where u can type your message and it works same as wall post,if i am not wrong.so just give a try to update status.

 

 

thankx.

 

___________________________________________________
please press kudos(star button on left) if this post is helpful to you
"Accept as solution" if your query has been resolved.@hitendra
_________________________________________________
Regular Contributor
Posts: 52
Registered: ‎10-07-2010
My Device: BlackBerry Curve 8520
My Carrier: Digitel

Re: Connect to facebook api in blackberry

How are you using the SDK in your project? Did you make a JAR file with it or something? cuz i'm using the project as a reference in mine, i tried just adding the packages but it get an error when building it, reading somewhere else it said it had something to do with the amount of files i have in my project

Highlighted
Contributor
Posts: 11
Registered: ‎10-06-2010
My Device: 9550
My Carrier: mtn

Re: Connect to facebook api in blackberry

Also had the problem of posting to stream...but i tweaked it (com.blackberry.facebook.UserImpl.java) this way...

 

line 320 - 362 (in my own case cos i implemented new features)

 

public void publishStream(String message, String linkUrl, String linkName, String linkCaption, String linkDescription) {
  try {
  JSONObject object = new JSONObject();
  object.put("message", message);
  object.put("link", linkUrl);
  object.put("name", linkName);
  object.put("caption", linkCaption);
  object.put("description", linkDescription);
  object.put("access_token", this.graph.getAccessToken());
  JSONObject responseObject = (JSONObject) graph.write(root + "/feed", object);
  log.debug(responseObject.toString());
  } catch (Exception e) {
  log.error(e.getMessage());
  }
 }
 
 public void publishStream(String message, String pictureUrl, String linkUrl, String linkName, String linkCaption, String linkDescription, String sourceUrl) {
  try {
  JSONObject object = new JSONObject();
  //message, picture, link, name, caption, description, source
  object.put("message", message);
  object.put("picture", pictureUrl);
  object.put("link", linkUrl);
  object.put("name", linkName);
  object.put("caption", linkCaption);
  object.put("description", linkDescription);
  object.put("source", sourceUrl);
  object.put("access_token", this.graph.getAccessToken());
  JSONObject responseObject = (JSONObject) graph.write(root + "/feed", object);
 log.debug(responseObject.toString());
 } catch (Exception e) {
 log.error(e.getMessage());
 }
}
*Facebook requires the access token when making such requests...it works perfectly now for me...
You could also implement a "Post Link" feature in your user implementation, it allows you to post a link to the user's wall...i implemented it like so...

 
public void publishLink(String message,String link){
 try{
 JSONObject object = new JSONObject();
 object.put("message", message);
 object.put("link", link);
 object.put("access_token", this.graph.getAccessToken());
 JSONObject responseObject = (JSONObject) graph.write(root + "/links", object);
 log.debug(responseObject.toString());
 } catch (Exception e) {
 log.error(e.getMessage());
 }
 }
NOTE: Please don't forget to add it to the User.java interface in com.blackberry.facebook

 

Developer
Posts: 201
Registered: ‎12-17-2010
My Device: Not Specified

Re: Connect to facebook api in blackberry

Hi,

I face the the same problem as all my friends faced to integrate facebook with blackberry.

So can any one help to come out from this problem?

Please help me...Its to much important for me....Smiley Sad

Developer
Posts: 172
Registered: ‎01-02-2012
My Device: 8520 curve
My Carrier: compny

Re: Connect to facebook api in blackberry

Hi every one i need to access profile of user like 


First name

last name 

Email

Gender etc...

   

 

 and I am not getting any idea.

 

Please if any body knows reply me.

 

Thanks