Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

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.
base fork: habuma/spring-social-facebook
base: ff3b110465
...
head fork: habuma/spring-social-facebook
compare: c157a35101
Checking mergeability… Don't worry, you can still create the pull request.
  • 19 commits
  • 7 files changed
  • 0 commit comments
  • 2 contributors
Commits on Oct 27, 2011
@robdrysdale robdrysdale Adding story and storyTag to Post which are required to interpret use…
…r new friends, sharing of photos, likes and tagging
fb418e8
@robdrysdale robdrysdale Adding story and storyTag to Post which are required to interpret use…
…r new friends, sharing of photos, likes and tagging
5781522
Commits on Dec 08, 2011
Craig Walls Merge remote-tracking branch 'robd/master' into robd 8ff1ea1
Commits on Feb 17, 2012
Craig Walls Merge pull request #25 from habuma/master
Fix for SOCIALFB-56
7389533
Craig Walls Merge pull request #26 from habuma/master
SOCIALFB-51: Added commentCount to Post
9ebd068
Commits on Feb 22, 2012
@habuma Merge pull request #27 from habuma/master
SOCIALFB-41: Likes count and likes list for Post
1a3e7b4
Commits on Mar 13, 2012
@habuma Merge pull request #28 from habuma/master
SOCIALFB-68: Capture cover_photo when fetching an Album.
8fc514f
Commits on Apr 02, 2012
Craig Walls Merged back in the story and story tags work. SOCIALFB-36 65391c8
@habuma Merge pull request #30 from habuma/master
Story and story tags support
a7eb570
Commits on Apr 12, 2012
@habuma Merge pull request #32 from habuma/master
Convert to submodule-free build
1a5f23b
@habuma Merge pull request #33 from habuma/master
Updated README to reflect new build process
a47f5bb
Commits on Apr 16, 2012
@habuma Merge pull request #34 from habuma/master
Updated dependencies
19d060b
@habuma Merge pull request #35 from habuma/master
Fix for SOCIALFB-41: NPE when no likes info is available.
ca1289e
@habuma Merge pull request #36 from habuma/master
Fixed null/existence checking in FqlResult. SOCIALFB-75
0e4c129
Commits on Apr 30, 2012
@habuma Merge pull request #38 from habuma/master
SOCIALFB-76 fix
d0053aa
Commits on May 02, 2012
@habuma Merge pull request #39 from habuma/master
SOCIALFB-69: Handle deauthorization requests from Facebook.
7d79503
@habuma Merge pull request #40 from habuma/master
SOCIALFB-23: Spring MVC web argument resolver support for signed_request from Facebook.
ef09592
Commits on May 08, 2012
@habuma Merge pull request #41 from habuma/master
SOCIALFB-80: Partial fix for changing Facebook error messages, focusing on the insufficient permissions case.
501531c
Commits on May 09, 2012
Craig Walls Removed unncecessary repositories from build.gradle c157a35
View
5 build.gradle
@@ -34,10 +34,7 @@ configure(allprojects) {
test.systemProperty("java.awt.headless", "true")
repositories {
- maven { url "http://repo.springsource.org/libs-release" }
- maven { url "http://repo.springsource.org/libs-milestone" }
maven { url "http://repo.springsource.org/libs-snapshot" }
- maven { url "http://repo.springsource.org/ebr-maven-external" }
}
dependencies {
@@ -107,7 +104,7 @@ project('spring-social-facebook-web') {
dependencies {
compile ("org.springframework:spring-web:$springVersion")
compile ("org.springframework.social:spring-social-core:$springSocialVersion") { optional = true }
- compile ("org.springframework.social:spring-social-facebook:$version") { optional = true }
+ compile project(':spring-social-facebook') { optional = true }
compile ("org.springframework.security:spring-security-crypto:$springSecurityCryptoVersion") { optional = true }
compile ("org.codehaus.jackson:jackson-mapper-asl:$jacksonVersion") { optional = true }
compile ("javax.servlet:servlet-api:$servletApiVersion") { provided = true }
View
13 spring-social-facebook/src/main/java/org/springframework/social/facebook/api/Post.java
@@ -17,6 +17,7 @@
import java.util.Date;
import java.util.List;
+import java.util.Map;
@@ -59,6 +60,10 @@
private ListAndCount<Comment> comments;
private int sharesCount;
+
+ private String story;
+
+ private Map<Integer,List<StoryTag>> storyTags;
public Post(String id, Reference from, Date createdTime, Date updatedTime) {
this.id = id;
@@ -151,6 +156,14 @@ public int getSharesCount() {
public List<Comment> getComments() {
return comments.getList();
}
+
+ public String getStory() {
+ return story;
+ }
+
+ public Map<Integer,List<StoryTag>> getStoryTags() {
+ return storyTags;
+ }
public int getCommentCount() {
return comments.getCount();
View
31 spring-social-facebook/src/main/java/org/springframework/social/facebook/api/StoryTag.java
@@ -0,0 +1,31 @@
+package org.springframework.social.facebook.api;
+
+public class StoryTag {
+ private final String id;
+ private final String name;
+ private final Integer offset;
+ private final Integer length;
+
+ public StoryTag(String id, String name, Integer offset, Integer length) {
+ this.id = id;
+ this.name = name;
+ this.offset = offset;
+ this.length = length;
+ }
+
+ public String getId() {
+ return id;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public Integer getOffset() {
+ return offset;
+ }
+
+ public Integer getLength() {
+ return length;
+ }
+}
View
2  spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/FacebookModule.java
@@ -44,6 +44,7 @@
import org.springframework.social.facebook.api.QuestionOption;
import org.springframework.social.facebook.api.Reference;
import org.springframework.social.facebook.api.StatusPost;
+import org.springframework.social.facebook.api.StoryTag;
import org.springframework.social.facebook.api.SwfPost;
import org.springframework.social.facebook.api.Tag;
import org.springframework.social.facebook.api.Video;
@@ -96,5 +97,6 @@ public void setupModule(SetupContext context) {
context.setMixInAnnotations(FamilyMember.class, FamilyMemberMixin.class);
context.setMixInAnnotations(Question.class, QuestionMixin.class);
context.setMixInAnnotations(QuestionOption.class, QuestionOptionMixin.class);
+ context.setMixInAnnotations(StoryTag.class, StoryTagMixin.class);
}
}
View
8 spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/PostMixin.java
@@ -18,6 +18,7 @@
import java.io.IOException;
import java.util.Date;
import java.util.List;
+import java.util.Map;
import org.codehaus.jackson.JsonNode;
import org.codehaus.jackson.JsonParser;
@@ -44,6 +45,7 @@
import org.springframework.social.facebook.api.Post.PostType;
import org.springframework.social.facebook.api.Reference;
import org.springframework.social.facebook.api.StatusPost;
+import org.springframework.social.facebook.api.StoryTag;
import org.springframework.social.facebook.api.SwfPost;
import org.springframework.social.facebook.api.VideoPost;
@@ -121,6 +123,12 @@
@JsonDeserialize(using = CommentListAndCountDeserializer.class)
ListAndCount<Comment> comments;
+ @JsonProperty("story")
+ String story;
+
+ @JsonProperty("story_tags")
+ @JsonDeserialize(using = StoryTagMapDeserializer.class)
+ Map<Integer,List<StoryTag>> storyTags;
private static class TypeDeserializer extends JsonDeserializer<PostType> {
@Override
View
36 ...al-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/StoryTagMapDeserializer.java
@@ -0,0 +1,36 @@
+package org.springframework.social.facebook.api.impl.json;
+
+import java.io.IOException;
+import java.util.Collections;
+import java.util.List;
+import java.util.Map;
+
+import org.codehaus.jackson.JsonNode;
+import org.codehaus.jackson.JsonParser;
+import org.codehaus.jackson.JsonProcessingException;
+import org.codehaus.jackson.map.DeserializationContext;
+import org.codehaus.jackson.map.JsonDeserializer;
+import org.codehaus.jackson.map.ObjectMapper;
+import org.codehaus.jackson.type.TypeReference;
+import org.springframework.social.facebook.api.StoryTag;
+
+public class StoryTagMapDeserializer extends JsonDeserializer<Map<Integer,List<StoryTag>>> {
+
+ @SuppressWarnings("unchecked")
+ @Override
+ public Map<Integer,List<StoryTag>> deserialize(JsonParser jp, DeserializationContext ctxt)
+ throws IOException, JsonProcessingException {
+ ObjectMapper mapper = new ObjectMapper();
+ mapper.setDeserializationConfig(ctxt.getConfig());
+ jp.setCodec(mapper);
+ if (jp.hasCurrentToken()) {
+ JsonNode dataNode = jp.readValueAsTree();
+ if (dataNode != null) {
+ return (Map<Integer,List<StoryTag>>) mapper.readValue(dataNode, new TypeReference<Map<Integer,List<StoryTag>>>() {});
+ }
+ }
+
+ return Collections.emptyMap();
+ }
+
+}
View
36 spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/StoryTagMixin.java
@@ -0,0 +1,36 @@
+/*
+ * Copyright 2011 the original author or authors.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.springframework.social.facebook.api.impl.json;
+
+import org.codehaus.jackson.annotate.JsonCreator;
+import org.codehaus.jackson.annotate.JsonIgnoreProperties;
+import org.codehaus.jackson.annotate.JsonProperty;
+
+/**
+ * Annotated mixin to add Jackson annotations to StoryTag.
+ * @author Robert Drysdale
+ */
+@JsonIgnoreProperties(ignoreUnknown = true)
+abstract class StoryTagMixin {
+
+ @JsonCreator
+ StoryTagMixin(
+ @JsonProperty("id") String id,
+ @JsonProperty("name") String name,
+ @JsonProperty("offset") Integer offset,
+ @JsonProperty("length") Integer length) {}
+
+}

No commit comments for this range

Something went wrong with that request. Please try again.