Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 6 commits
  • 5 files changed
  • 0 commit comments
  • 1 contributor
View
2 build.xml
@@ -5,7 +5,7 @@
<property name="lib.dir" value="lib" />
<property name="build.dir" value="build" />
<property name="project.name" value="face4j" />
- <property name="project.version" value="1.6" />
+ <property name="project.version" value="1.7" />
<property name="dist.dir" value="dist" />
<property name="archive.name-face4j" value="face4j-${project.version}" />
<property name="exclude-classes" value="com/face4j/dummy/**,com/face4j/facebook/test/**"></property>
View
BIN dist/face4j-1.7.jar
Binary file not shown.
View
3 release.txt
@@ -85,3 +85,6 @@ version 0.4.1
26/04/2012
1.6
+
+11/05/2012
+1.7
View
15 src/com/face4j/facebook/CommonReturnObject.java
@@ -0,0 +1,15 @@
+package com.face4j.facebook;
+
+import java.io.Serializable;
+
+public class CommonReturnObject implements Serializable {
+
+ private static final long serialVersionUID = 3270450900106078122L;
+
+ private String id;
+
+ public String getId() {
+ return id;
+ }
+
+}
View
9 src/com/face4j/facebook/Facebook.java
@@ -416,9 +416,12 @@ public void shareLink(String link, String message, String picture, String name,
* Comment on the given object (if it has a /comments connection)
* @param message
* @param objectId
+ *
+ * @return The new ID of the comment
+ *
* @throws FacebookException
*/
- public void comment(String message, String objectId) throws FacebookException{
+ public CommonReturnObject comment(String message, String objectId) throws FacebookException{
List<NameValuePair> namesValues = new ArrayList<NameValuePair>();
namesValues.add(new NameValuePair(Constants.PARAM_ACCESS_TOKEN, this.authAccessToken.getAccessToken()));
@@ -426,7 +429,9 @@ public void comment(String message, String objectId) throws FacebookException{
NameValuePair[] nameValuePairs = new NameValuePair[namesValues.size()];
namesValues.toArray(nameValuePairs);
- caller.postData(Constants.FACEBOOK_GRAPH_URL + Constants.POST_COMMENTS.replaceFirst(Constants.REPLACE_OBJECT_ID, objectId), nameValuePairs);
+ String response = caller.postData(Constants.FACEBOOK_GRAPH_URL + Constants.POST_COMMENTS.replaceFirst(Constants.REPLACE_OBJECT_ID, objectId), nameValuePairs);
+
+ return JSONToObjectTransformer.getObject(response, CommonReturnObject.class);
}
/**

No commit comments for this range

Something went wrong with that request. Please try again.