├── .gitignore ├── .travis.yml ├── CODE_OF_CONDUCT.adoc ├── CONTRIBUTING.adoc ├── LICENSE ├── NOTICE ├── README ├── README.md ├── build.gradle ├── docs ├── docs.gradle └── manual │ └── src │ └── asciidoc │ └── index.adoc ├── gradle.properties ├── gradle └── wrapper │ ├── gradle-wrapper.jar │ └── gradle-wrapper.properties ├── gradlew ├── gradlew.bat ├── publish-maven.gradle ├── settings.gradle ├── spring-social-facebook-autoconfigure └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── social │ │ │ └── facebook │ │ │ └── autoconfigure │ │ │ ├── FacebookAutoConfiguration.java │ │ │ ├── FacebookProperties.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── spring.factories │ └── test │ └── java │ └── org │ └── springframework │ └── social │ └── facebook │ └── autoconfigure │ ├── AbstractSocialAutoConfigurationTests.java │ └── FacebookAutoConfigurationTests.java ├── spring-social-facebook-itest ├── build.gradle ├── gradle.properties ├── infinitest.filters └── src │ └── test │ ├── java │ └── org │ │ └── springframework │ │ └── social │ │ └── facebook │ │ └── itest │ │ ├── AchievementOperationsITests.java │ │ ├── CommentOperationsITests.java │ │ ├── ErrorsITests.java │ │ ├── EventOperationsITests.java │ │ ├── FacebookITest.java │ │ ├── FeedOperationsITests.java │ │ ├── FriendOperationsITests.java │ │ ├── GroupOperationsITests.java │ │ ├── ITestCredentials.java │ │ ├── LikeOperationsITests.java │ │ ├── MediaOperationsITests.java │ │ ├── PageOperationsITests.java │ │ └── UserOperationsITests.java │ └── resources │ ├── GrizzlyPeak.jpg │ ├── hamlet.mov │ └── log4j.xml ├── spring-social-facebook-web └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── social │ │ │ └── facebook │ │ │ └── web │ │ │ ├── CanvasSignInController.java │ │ │ ├── DisconnectController.java │ │ │ ├── FacebookCookieParser.java │ │ │ ├── FacebookCookieValue.java │ │ │ ├── FacebookInitTag.java │ │ │ ├── FacebookWebArgumentResolver.java │ │ │ ├── RealTimeUpdate.java │ │ │ ├── RealTimeUpdateController.java │ │ │ ├── SignedRequest.java │ │ │ ├── SignedRequestArgumentResolver.java │ │ │ ├── SignedRequestDecoder.java │ │ │ ├── SignedRequestException.java │ │ │ ├── UpdateHandler.java │ │ │ └── package-info.java │ └── resources │ │ └── META-INF │ │ └── facebook.tld │ └── test │ ├── java │ └── org │ │ └── springframework │ │ └── social │ │ └── facebook │ │ └── web │ │ ├── DeauthorizationRequest.java │ │ ├── DisconnectControllerTest.java │ │ ├── FacebookArgumentResolverTest.java │ │ ├── FacebookInitTagTest.java │ │ ├── RealTimeUpdateControllerTest.java │ │ ├── SignedRequestArgumentResolverTest.java │ │ ├── SignedRequestDecoderTest.java │ │ ├── StubConnectionRepository.java │ │ └── StubUsersConnectionRepository.java │ └── resources │ ├── log4j.xml │ └── org │ └── springframework │ └── social │ └── facebook │ └── web │ ├── rtupdate-many.json │ └── rtupdate-simple.json ├── spring-social-facebook └── src │ ├── main │ ├── java │ │ └── org │ │ │ └── springframework │ │ │ └── social │ │ │ └── facebook │ │ │ ├── api │ │ │ ├── Account.java │ │ │ ├── Achievement.java │ │ │ ├── AchievementOperations.java │ │ │ ├── AchievementType.java │ │ │ ├── Action.java │ │ │ ├── ActionMetadata.java │ │ │ ├── AgeRange.java │ │ │ ├── Album.java │ │ │ ├── ApplicationReference.java │ │ │ ├── BookActions.java │ │ │ ├── Comment.java │ │ │ ├── CommentOperations.java │ │ │ ├── CountedList.java │ │ │ ├── CoverPhoto.java │ │ │ ├── Currency.java │ │ │ ├── Device.java │ │ │ ├── EducationExperience.java │ │ │ ├── Engagement.java │ │ │ ├── Event.java │ │ │ ├── EventInvitee.java │ │ │ ├── EventOperations.java │ │ │ ├── Experience.java │ │ │ ├── Facebook.java │ │ │ ├── FacebookError.java │ │ │ ├── FacebookErrors.java │ │ │ ├── FacebookLink.java │ │ │ ├── FacebookObject.java │ │ │ ├── FamilyMember.java │ │ │ ├── FeedOperations.java │ │ │ ├── FitnessActions.java │ │ │ ├── FqlException.java │ │ │ ├── FqlResult.java │ │ │ ├── FqlResultMapper.java │ │ │ ├── FriendList.java │ │ │ ├── FriendOperations.java │ │ │ ├── GeneralActions.java │ │ │ ├── GraphApi.java │ │ │ ├── Group.java │ │ │ ├── GroupMemberReference.java │ │ │ ├── GroupMembership.java │ │ │ ├── GroupOperations.java │ │ │ ├── ImageSource.java │ │ │ ├── ImageType.java │ │ │ ├── Invitation.java │ │ │ ├── LikeOperations.java │ │ │ ├── ListAndCount.java │ │ │ ├── ListenActionMetadata.java │ │ │ ├── Location.java │ │ │ ├── MailingAddress.java │ │ │ ├── MediaOperations.java │ │ │ ├── MessageTag.java │ │ │ ├── MissingNamespaceException.java │ │ │ ├── MusicActions.java │ │ │ ├── NotAFriendException.java │ │ │ ├── OpenGraphOperations.java │ │ │ ├── Page.java │ │ │ ├── PageAdministrationException.java │ │ │ ├── PageOperations.java │ │ │ ├── PageParking.java │ │ │ ├── PagePaymentOptions.java │ │ │ ├── PagePostData.java │ │ │ ├── PageRestaurantServices.java │ │ │ ├── PageRestaurantSpecialties.java │ │ │ ├── PageUpdate.java │ │ │ ├── PagedList.java │ │ │ ├── PagingParameters.java │ │ │ ├── PaymentPricePoint.java │ │ │ ├── PaymentPricePoints.java │ │ │ ├── Permission.java │ │ │ ├── Photo.java │ │ │ ├── Place.java │ │ │ ├── PlaceTag.java │ │ │ ├── Post.java │ │ │ ├── PostData.java │ │ │ ├── PostProperty.java │ │ │ ├── ProfilePictureSource.java │ │ │ ├── RatingActionMetadata.java │ │ │ ├── Reference.java │ │ │ ├── ResourceOwnershipException.java │ │ │ ├── RestaurantServices.java │ │ │ ├── RsvpStatus.java │ │ │ ├── SecuritySettings.java │ │ │ ├── SocialContextOperations.java │ │ │ ├── StoryAttachment.java │ │ │ ├── Tag.java │ │ │ ├── Targeting.java │ │ │ ├── TestUser.java │ │ │ ├── TestUserList.java │ │ │ ├── TestUserOperations.java │ │ │ ├── User.java │ │ │ ├── UserIdForApp.java │ │ │ ├── UserInvitableFriend.java │ │ │ ├── UserOperations.java │ │ │ ├── UserTaggableFriend.java │ │ │ ├── Video.java │ │ │ ├── VideoActions.java │ │ │ ├── VideoUploadLimits.java │ │ │ ├── VoipInfo.java │ │ │ ├── WatchActionMetadata.java │ │ │ ├── WorkEntry.java │ │ │ ├── impl │ │ │ │ ├── AbstractFacebookOperations.java │ │ │ │ ├── AchievementTemplate.java │ │ │ │ ├── BookActionsTemplate.java │ │ │ │ ├── CommentTemplate.java │ │ │ │ ├── EventTemplate.java │ │ │ │ ├── FacebookErrorHandler.java │ │ │ │ ├── FacebookTemplate.java │ │ │ │ ├── FeedTemplate.java │ │ │ │ ├── FitnessActionsTemplate.java │ │ │ │ ├── FriendTemplate.java │ │ │ │ ├── GeneralActionsTemplate.java │ │ │ │ ├── GroupTemplate.java │ │ │ │ ├── LikeTemplate.java │ │ │ │ ├── ListDeserializer.java │ │ │ │ ├── MediaTemplate.java │ │ │ │ ├── MusicActionsTemplate.java │ │ │ │ ├── OpenGraphTemplate.java │ │ │ │ ├── PageTemplate.java │ │ │ │ ├── PagedListUtils.java │ │ │ │ ├── SocialContextTemplate.java │ │ │ │ ├── TestUserTemplate.java │ │ │ │ ├── UserTemplate.java │ │ │ │ ├── VideoActionsTemplate.java │ │ │ │ ├── json │ │ │ │ │ ├── AccountMixin.java │ │ │ │ │ ├── AchievementMixin.java │ │ │ │ │ ├── AchievementTypeMixin.java │ │ │ │ │ ├── ActionMixin.java │ │ │ │ │ ├── AlbumMixin.java │ │ │ │ │ ├── ApplicationReferenceMixin.java │ │ │ │ │ ├── CommentMixin.java │ │ │ │ │ ├── CoverPhotoMixin.java │ │ │ │ │ ├── CurrencyMixin.java │ │ │ │ │ ├── DeviceMixin.java │ │ │ │ │ ├── EducationExperienceMixin.java │ │ │ │ │ ├── EngagementMixin.java │ │ │ │ │ ├── EventInviteeMixin.java │ │ │ │ │ ├── EventMixin.java │ │ │ │ │ ├── ExperienceMixin.java │ │ │ │ │ ├── FacebookModule.java │ │ │ │ │ ├── FacebookObjectMixin.java │ │ │ │ │ ├── FamilyMemberMixin.java │ │ │ │ │ ├── FriendListMixin.java │ │ │ │ │ ├── GroupMemberReferenceMixin.java │ │ │ │ │ ├── GroupMembershipMixin.java │ │ │ │ │ ├── GroupMixin.java │ │ │ │ │ ├── ImageSourceMixin.java │ │ │ │ │ ├── InvitationMixin.java │ │ │ │ │ ├── LocationMixin.java │ │ │ │ │ ├── MailingAddressMixin.java │ │ │ │ │ ├── MessageTagMapDeserializer.java │ │ │ │ │ ├── MessageTagMixin.java │ │ │ │ │ ├── PageMixin.java │ │ │ │ │ ├── PageParkingMixin.java │ │ │ │ │ ├── PagePaymentOptionsMixin.java │ │ │ │ │ ├── PageRestaurantServicesMixin.java │ │ │ │ │ ├── PaymentPricePointMixin.java │ │ │ │ │ ├── PaymentPricePointsMixin.java │ │ │ │ │ ├── PhotoMixin.java │ │ │ │ │ ├── PictureDeserializer.java │ │ │ │ │ ├── PlaceMixin.java │ │ │ │ │ ├── PlaceTagMixin.java │ │ │ │ │ ├── PostMixin.java │ │ │ │ │ ├── PostPropertyMixin.java │ │ │ │ │ ├── ProfilePictureSourceMixin.java │ │ │ │ │ ├── ReferenceListDeserializer.java │ │ │ │ │ ├── ReferenceMixin.java │ │ │ │ │ ├── RestaurantServicesMixin.java │ │ │ │ │ ├── RestaurantSpecialtiesMixin.java │ │ │ │ │ ├── RsvpStatusDeserializer.java │ │ │ │ │ ├── SecuritySettingsMixin.java │ │ │ │ │ ├── StoryAttachmentMixin.java │ │ │ │ │ ├── TagListDeserializer.java │ │ │ │ │ ├── TagMixin.java │ │ │ │ │ ├── TestUserMixin.java │ │ │ │ │ ├── UserIdForAppMixin.java │ │ │ │ │ ├── UserInvitableFriendMixin.java │ │ │ │ │ ├── UserMixin.java │ │ │ │ │ ├── UserTaggableFriendMixin.java │ │ │ │ │ ├── VideoMixin.java │ │ │ │ │ ├── VideoUploadLimitsMixin.java │ │ │ │ │ ├── VoipInfoMixin.java │ │ │ │ │ ├── WorkEntryMixin.java │ │ │ │ │ └── package-info.java │ │ │ │ └── package-info.java │ │ │ └── package-info.java │ │ │ ├── config │ │ │ ├── support │ │ │ │ ├── FacebookApiHelper.java │ │ │ │ └── package-info.java │ │ │ └── xml │ │ │ │ ├── FacebookConfigBeanDefinitionParser.java │ │ │ │ ├── FacebookNamespaceHandler.java │ │ │ │ └── package-info.java │ │ │ ├── connect │ │ │ ├── FacebookAdapter.java │ │ │ ├── FacebookConnectionFactory.java │ │ │ ├── FacebookServiceProvider.java │ │ │ └── package-info.java │ │ │ └── security │ │ │ ├── FacebookAppSecretProofInterceptor.java │ │ │ ├── FacebookAuthenticationService.java │ │ │ └── package-info.java │ └── resources │ │ ├── META-INF │ │ ├── spring.handlers │ │ └── spring.schemas │ │ └── org │ │ └── springframework │ │ └── social │ │ └── facebook │ │ └── config │ │ └── xml │ │ └── spring-social-facebook-1.1.xsd │ └── test │ ├── java │ └── org │ │ └── springframework │ │ └── social │ │ └── facebook │ │ ├── api │ │ ├── AbstractFacebookApiTest.java │ │ ├── AchievementTemplateTest.java │ │ ├── BookActionsTemplateTest.java │ │ ├── CommentTemplateTest.java │ │ ├── ErrorHandlingTest.java │ │ ├── EventTemplateTest.java │ │ ├── FeedTemplateTest.java │ │ ├── FitnessActionTemplateTest.java │ │ ├── FriendTemplateTest.java │ │ ├── GeneralActionTemplateTest.java │ │ ├── GroupTemplateTest.java │ │ ├── LikeTemplateTest.java │ │ ├── MediaTemplateTest.java │ │ ├── MusicActionsTemplateTest.java │ │ ├── OpenGraphTemplateTest.java │ │ ├── PageTemplateTest.java │ │ ├── PagedListTest.java │ │ ├── SocialContextTemplateTest.java │ │ ├── TestUserTemplateTest.java │ │ ├── UserTemplateTest.java │ │ ├── VersionedApiTest.java │ │ └── VideoActionsTemplateTest.java │ │ └── connect │ │ └── FacebookAdapterTest.java │ └── resources │ └── org │ └── springframework │ └── social │ └── facebook │ └── api │ ├── accounts.json │ ├── achievement-type.json │ ├── achievement-types.json │ ├── achievement.json │ ├── achievements.json │ ├── activities.json │ ├── album-with-unknown-privacy.json │ ├── album-with-unknown-type.json │ ├── album.json │ ├── albums.json │ ├── all_mutual_friends.json │ ├── application-page.json │ ├── attending.json │ ├── checkin-with-string-location.json │ ├── checkin.json │ ├── checkins.json │ ├── comment.json │ ├── comment_preSept2012.json │ ├── comments.json │ ├── create-friend-list.json │ ├── declined.json │ ├── emptyFeed.json │ ├── error-1-httpsRequired.json │ ├── error-10-permissionDenied.json │ ├── error-100-badRequestUrl.json │ ├── error-100-nonExistingFields.json │ ├── error-104-noAccessToken.json │ ├── error-15-invitableNonGame.json │ ├── error-190-bogusAccessToken.json │ ├── error-190-tokenExpired.json │ ├── error-190-userLoggedOut.json │ ├── error-190-userRevokedToken.json │ ├── error-2-serviceUnavailable.json │ ├── error-200-notAuthorizedForAction.json │ ├── error-2500-bogusPath.json │ ├── error-368-blocked.json │ ├── error-506-duplicate.json │ ├── error-803-unknownAlias.json │ ├── error-app-capability.json │ ├── error-duplicate-status.json │ ├── error-duplicate-to-twitter.json │ ├── error-expired-token.json │ ├── error-insufficient-privilege.json │ ├── error-invalid-fbid.json │ ├── error-invalid-token-deauth.json │ ├── error-invalid-token-password.json │ ├── error-invalid-token-signout.json │ ├── error-not-a-friend.json │ ├── error-not-json.html │ ├── error-not-the-owner.json │ ├── error-permission.json │ ├── error-rate-limit.json │ ├── error-url-parameter.json │ ├── error-user-hasnt-authorized.json │ ├── error-whitelist.json │ ├── event-list.json │ ├── event.json │ ├── family.json │ ├── feed-with-unknown-type.json │ ├── feed.json │ ├── feedPage1.json │ ├── feedPage2.json │ ├── feedPage3.json │ ├── fql-result-basic-with-float.json │ ├── fql-result-basic.json │ ├── fql-result-list-of-objects.json │ ├── fql-result-with-object-field.json │ ├── fql-with-nulls.json │ ├── friend-ids.json │ ├── friend-list.json │ ├── friend-lists.json │ ├── friends.json │ ├── friends_tagged_at.json │ ├── friends_using_app.json │ ├── friends_who_like.json │ ├── full-event.json │ ├── full-profile.json │ ├── games.json │ ├── group-list.json │ ├── group-members.json │ ├── group-memberships.json │ ├── group.json │ ├── id-only.json │ ├── ids_for_business.json │ ├── interests.json │ ├── invitable_friends.json │ ├── invited.json │ ├── likes.json │ ├── links.json │ ├── links_preOct2012.json │ ├── maybe-attending.json │ ├── minimal-profile-no-middle-name.json │ ├── minimal-profile-with-age-range-13-17.json │ ├── minimal-profile-with-age-range-18-20.json │ ├── minimal-profile-with-age-range-21-plus.json │ ├── minimal-profile-with-age-range-unknown.json │ ├── minimal-profile-with-timezone.json │ ├── minimal-profile.json │ ├── music_listen_friends.json │ ├── mutual_friends.json │ ├── mutual_likes.json │ ├── new-user-likes.json │ ├── no-replies.json │ ├── organization-page.json │ ├── page-with-extra-data.json │ ├── photo.json │ ├── photos.json │ ├── place-page.json │ ├── place-with-hours-page.json │ ├── places-list.json │ ├── post-list.json │ ├── post.json │ ├── post_nolikes.json │ ├── post_preSept2012.json │ ├── product-page.json │ ├── question-option.json │ ├── question-options.json │ ├── question-with-options.json │ ├── question-without-options.json │ ├── questions-asked-list.json │ ├── questions.json │ ├── simple-event-friend-privacy.json │ ├── simple-event.json │ ├── subscribe-list.json │ ├── taggable_friends.json │ ├── tagged_places.json │ ├── tinyrod.jpg │ ├── user-events.json │ ├── user-likes.json │ ├── user-notes.json │ ├── user-permissions.json │ ├── user-profiles.json │ ├── user-references.json │ ├── user-statuses.json │ ├── video.json │ ├── video_preOct2012.json │ ├── video_watch_friends.json │ ├── videos.json │ └── videos_preOct2012.json └── src ├── api ├── doc-files │ └── th-background.png ├── overview.html └── spring-javadoc.css └── dist ├── changelog.txt ├── license.txt ├── notice.txt └── readme.txt /.gitignore: -------------------------------------------------------------------------------- 1 | .classpath 2 | .project 3 | .settings 4 | .DS_Store 5 | build 6 | **/build 7 | **/src/test/java/exploration 8 | .gradle 9 | spring-social-core/src/test/java/exploration 10 | **/.classpath 11 | **/.project 12 | **/.settings 13 | **/bin 14 | .idea 15 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: java 2 | jdk: oraclejdk8 -------------------------------------------------------------------------------- /NOTICE: -------------------------------------------------------------------------------- 1 | ============================================================================ 2 | == NOTICE file corresponding to section 4 d of the Apache License, == 3 | == Version 2.0, in this case for the Spring Social Facebook distribution. == 4 | ============================================================================ 5 | 6 | This product includes software developed by 7 | the Apache Software Foundation (https://www.apache.org). 8 | 9 | The end-user documentation included with a redistribution, if any, 10 | must include the following acknowledgement: 11 | 12 | "This product includes software developed by the Spring Framework 13 | Project (https://www.springframework.org)." 14 | 15 | Alternatively, this acknowledgement may appear in the software itself, 16 | if and wherever such third-party acknowledgements normally appear. 17 | 18 | The names "Spring", "Spring Framework", and "Spring Social" must 19 | not be used to endorse or promote products derived from this software 20 | without prior written permission. For written permission, please contact 21 | enquiries@springsource.com. 22 | -------------------------------------------------------------------------------- /README: -------------------------------------------------------------------------------- 1 | =========================== Spring Social Facebook =========================== 2 | To check out the project and build from source, do the following: 3 | 4 | git clone git://github.com/SpringSource/spring-social-facebook.git 5 | cd spring-social-facebook 6 | ./gradlew build 7 | 8 | ------------------------------------------------------------------------------- 9 | To generate Eclipse metadata (.classpath and .project files), do the following: 10 | 11 | ./gradlew eclipse 12 | 13 | Once complete, you may then import the projects into Eclipse as usual: 14 | 15 | File -> Import -> Existing projects into workspace 16 | 17 | ------------------------------------------------------------------------------- 18 | To generate IDEA metadata (.iml and .ipr files), do the following: 19 | 20 | ./gradlew idea 21 | 22 | ------------------------------------------------------------------------------- 23 | To build the JavaDoc, do the following from within the root directory: 24 | 25 | ./gradlew :docs:api 26 | 27 | The result will be available in 'docs/build/api'. 28 | =============================================================================== 29 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # spring-social-facebook is no longer actively maintained by VMware, Inc. 2 | 3 | 4 | -------------------------------------------------------------------------------- /gradle.properties: -------------------------------------------------------------------------------- 1 | junitVersion=4.12 2 | springVersion=5.0.0.RELEASE 3 | springSocialVersion=2.0.0.BUILD-SNAPSHOT 4 | springSnapshotVersion=latest.integration 5 | springBootVersion=2.0.0.M6 6 | hamcrestVersion=1.3 7 | version=3.0.0.BUILD-SNAPSHOT 8 | jacksonVersion=2.9.2 9 | jspApiVersion=2.3.2-b02 10 | servletApiVersion=3.1.0 11 | springReleaseVersion=latest.release 12 | mockitoVersion=2.11.0 13 | -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.jar: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/spring-social-facebook/57aadf32f68aa30eadd792c97386f2328ede3edd/gradle/wrapper/gradle-wrapper.jar -------------------------------------------------------------------------------- /gradle/wrapper/gradle-wrapper.properties: -------------------------------------------------------------------------------- 1 | #Tue Nov 29 09:00:35 EST 2016 2 | distributionBase=GRADLE_USER_HOME 3 | distributionPath=wrapper/dists 4 | zipStoreBase=GRADLE_USER_HOME 5 | zipStorePath=wrapper/dists 6 | distributionUrl=https\://services.gradle.org/distributions/gradle-3.0-bin.zip 7 | -------------------------------------------------------------------------------- /settings.gradle: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2011 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | rootProject.name = 'spring-social-facebook-build' 18 | 19 | include 'docs', 'docs:manual' 20 | def docs = findProject(':docs') 21 | docs.buildFileName = 'docs.gradle' 22 | 23 | include 'spring-social-facebook' 24 | include 'spring-social-facebook-web' 25 | include 'spring-social-facebook-autoconfigure' 26 | -------------------------------------------------------------------------------- /spring-social-facebook-autoconfigure/src/main/java/org/springframework/social/facebook/autoconfigure/FacebookProperties.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package org.springframework.social.facebook.autoconfigure; 18 | 19 | import org.springframework.boot.context.properties.ConfigurationProperties; 20 | import org.springframework.social.autoconfigure.SocialProperties; 21 | 22 | /** 23 | * Properties for Spring Social Facebook. 24 | * 25 | * @author Stephane Nicoll 26 | * @since 1.2.0 27 | */ 28 | @ConfigurationProperties(prefix = "spring.social.facebook") 29 | public class FacebookProperties extends SocialProperties { 30 | 31 | } 32 | -------------------------------------------------------------------------------- /spring-social-facebook-autoconfigure/src/main/java/org/springframework/social/facebook/autoconfigure/package-info.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2012-2017 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | /** 18 | * Auto-configuration for Spring Social. 19 | */ 20 | package org.springframework.social.facebook.autoconfigure; 21 | -------------------------------------------------------------------------------- /spring-social-facebook-autoconfigure/src/main/resources/META-INF/spring.factories: -------------------------------------------------------------------------------- 1 | # Auto Configure 2 | org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ 3 | org.springframework.social.facebook.autoconfigure.FacebookAutoConfiguration 4 | -------------------------------------------------------------------------------- /spring-social-facebook-itest/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'eclipse' 2 | apply plugin: 'java' 3 | 4 | buildscript { 5 | repositories { 6 | mavenCentral() 7 | } 8 | 9 | dependencies { 10 | classpath 'org.gradle.api.plugins:gradle-tomcat-plugin:0.9.9' 11 | } 12 | } 13 | 14 | sourceCompatibility = 1.7 15 | targetCompatibility = 1.7 16 | 17 | dependencies { 18 | compile "org.springframework.social:spring-social-facebook:$springSocialFacebookVersion" 19 | compile "log4j:log4j:1.2.17" 20 | testCompile "junit:junit-dep:$junitVersion" 21 | } 22 | 23 | repositories { 24 | mavenLocal() 25 | maven { url 'https://maven.springframework.org/release' } 26 | maven { url 'https://maven.springframework.org/milestone' } 27 | maven { url 'https://maven.springframework.org/snapshot' } 28 | maven { url 'https://download.java.net/maven/2' } 29 | mavenCentral() 30 | } 31 | 32 | task wrapper(type: Wrapper) { 33 | gradleVersion = '1.11' 34 | } 35 | -------------------------------------------------------------------------------- /spring-social-facebook-itest/gradle.properties: -------------------------------------------------------------------------------- 1 | springSocialFacebookVersion = 2.0.0.BUILD-SNAPSHOT 2 | junitVersion = 4.11 -------------------------------------------------------------------------------- /spring-social-facebook-itest/infinitest.filters: -------------------------------------------------------------------------------- 1 | .*ITests 2 | .*ITest 3 | -------------------------------------------------------------------------------- /spring-social-facebook-itest/src/test/java/org/springframework/social/facebook/itest/ITestCredentials.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.itest; 17 | 18 | public interface ITestCredentials { 19 | 20 | static final String APP_ID = "881909855188696"; 21 | 22 | static final String APP_SECRET = "33908ee58e5fd761a807872b9844848f"; 23 | 24 | } 25 | -------------------------------------------------------------------------------- /spring-social-facebook-itest/src/test/resources/GrizzlyPeak.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/spring-social-facebook/57aadf32f68aa30eadd792c97386f2328ede3edd/spring-social-facebook-itest/src/test/resources/GrizzlyPeak.jpg -------------------------------------------------------------------------------- /spring-social-facebook-itest/src/test/resources/hamlet.mov: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/spring-social-facebook/57aadf32f68aa30eadd792c97386f2328ede3edd/spring-social-facebook-itest/src/test/resources/hamlet.mov -------------------------------------------------------------------------------- /spring-social-facebook-itest/src/test/resources/log4j.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /spring-social-facebook-web/src/main/java/org/springframework/social/facebook/web/SignedRequest.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.web; 17 | 18 | import java.lang.annotation.Documented; 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * @author Craig Walls 26 | */ 27 | @Target(ElementType.PARAMETER) 28 | @Retention(RetentionPolicy.RUNTIME) 29 | @Documented 30 | public @interface SignedRequest { 31 | 32 | /** 33 | * Whether the signed_request parameter is required. 34 | * Default is true, leading to an exception being thrown in case signed_request is missing. 35 | * Switch this to false if you prefer a null in case of a missing signed_request parameter. 36 | * @return true if the parameter is required 37 | */ 38 | boolean required() default true; 39 | } 40 | -------------------------------------------------------------------------------- /spring-social-facebook-web/src/main/java/org/springframework/social/facebook/web/SignedRequestException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.web; 17 | 18 | /** 19 | * Exception thrown by SignedRequestDecoder when there is a problem in decoding the signed_request parameter. 20 | * @author habuma 21 | */ 22 | @SuppressWarnings("serial") 23 | public class SignedRequestException extends Exception { 24 | 25 | public SignedRequestException(String message) { 26 | super(message); 27 | } 28 | 29 | public SignedRequestException(String message, Throwable throwable) { 30 | super(message, throwable); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /spring-social-facebook-web/src/main/java/org/springframework/social/facebook/web/UpdateHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.web; 17 | 18 | /** 19 | * Strategy interface for handling real time updates. 20 | * Implementations can be wired into {@link RealTimeUpdateController} to receive any updates from Facebook as they arrive. 21 | * @author Craig Walls 22 | */ 23 | public interface UpdateHandler { 24 | 25 | public void handleUpdate(String subscription, RealTimeUpdate update); 26 | 27 | } 28 | -------------------------------------------------------------------------------- /spring-social-facebook-web/src/main/java/org/springframework/social/facebook/web/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Sign in with Facebook controller and FacebookCookieValue annotation support 3 | */ 4 | package org.springframework.social.facebook.web; 5 | -------------------------------------------------------------------------------- /spring-social-facebook-web/src/main/resources/META-INF/facebook.tld: -------------------------------------------------------------------------------- 1 | 2 | 6 | 7 | Spring Social Facebook JSP Tag Library 8 | 1.0 9 | facebook 10 | http://www.springframework.org/spring-social/facebook/tags 11 | 12 | 13 | Initializes Facebook's JavaScript API 14 | init 15 | org.springframework.social.facebook.web.FacebookInitTag 16 | empty 17 | 18 | The application's Facebook ID 19 | appId 20 | true 21 | true 22 | 23 | 24 | -------------------------------------------------------------------------------- /spring-social-facebook-web/src/test/resources/log4j.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | -------------------------------------------------------------------------------- /spring-social-facebook-web/src/test/resources/org/springframework/social/facebook/web/rtupdate-many.json: -------------------------------------------------------------------------------- 1 | {"object":"user","entry":[{"uid":"424711","id":"424711","time":1373804766,"changed_fields":["friends"]},{"uid":"620448186","id":"620448186","time":1373804766,"changed_fields":["feed","friends"]}]} -------------------------------------------------------------------------------- /spring-social-facebook-web/src/test/resources/org/springframework/social/facebook/web/rtupdate-simple.json: -------------------------------------------------------------------------------- 1 | {"object":"user","entry":[{"uid":"183562555","id":"183562555","time":1374559990,"changed_fields":["friends"]}]} -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/Account.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | import java.util.List; 19 | 20 | public class Account extends FacebookObject { 21 | 22 | private String id; 23 | 24 | private String name; 25 | 26 | private String category; 27 | 28 | private String accessToken; 29 | 30 | private List permissions; 31 | 32 | public String getId() { 33 | return id; 34 | } 35 | 36 | public String getName() { 37 | return name; 38 | } 39 | 40 | public String getCategory() { 41 | return category; 42 | } 43 | 44 | public String getAccessToken() { 45 | return accessToken; 46 | } 47 | 48 | public List getPermissions() { 49 | return permissions; 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/AchievementOperations.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | import java.util.List; 19 | 20 | /** 21 | * Defines operations for working with Facebook achievements. 22 | * @author Craig Walls 23 | * @since 2.0 24 | */ 25 | public interface AchievementOperations { 26 | 27 | Achievement getAchievement(String achievementId); 28 | 29 | List getAchievements(); 30 | 31 | String postAchievement(String achievementUrl); 32 | 33 | void removeAchievement(String achievementUrl); 34 | 35 | 36 | List getAchievementTypes(); 37 | 38 | AchievementType getAchievementType(String achievementTypeId); 39 | 40 | void createAchievementType(String achievementTypeUrl, int displayOrder); 41 | 42 | void removeAchievementType(String achievementTypeUrl); 43 | 44 | } 45 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/Action.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | public class Action { 19 | 20 | private final String name; 21 | 22 | private final String link; 23 | 24 | public Action(String name, String link) { 25 | this.name = name; 26 | this.link = link; 27 | } 28 | 29 | public String getName() { 30 | return name; 31 | } 32 | 33 | public String getLink() { 34 | return link; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/ApplicationReference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | /** 19 | * Model class representing a reference to an application. 20 | * @author Craig Walls 21 | * @since 2.0 22 | */ 23 | @SuppressWarnings("serial") 24 | public class ApplicationReference extends Reference { 25 | 26 | private final String url; 27 | 28 | public ApplicationReference(String id, String name, String url) { 29 | super(id, name); 30 | this.url = url; 31 | } 32 | 33 | public String getUrl() { 34 | return url; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/CoverPhoto.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | /** 19 | * Model class representing a user's or a page's cover photo. 20 | * @author Craig Walls 21 | */ 22 | public class CoverPhoto extends FacebookObject { 23 | 24 | private String id; 25 | 26 | private int offsetX; 27 | 28 | private int offsetY; 29 | 30 | private String source; 31 | 32 | /** 33 | * @return The ID of the cover photo's Photo object. 34 | */ 35 | public String getId() { 36 | return id; 37 | } 38 | 39 | /** 40 | * @return A link to the cover photo's image. 41 | */ 42 | public String getSource() { 43 | return source; 44 | } 45 | 46 | /** 47 | * @return The percentage of offset from left (0-100). 48 | */ 49 | public int getOffsetX() { 50 | return offsetX; 51 | } 52 | 53 | /** 54 | * @return The percentage of offset from top (0-100). 55 | */ 56 | public int getOffsetY() { 57 | return offsetY; 58 | } 59 | 60 | } 61 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/Currency.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | public class Currency { 19 | 20 | private int currencyOffset; 21 | 22 | private String userCurrency; 23 | 24 | private float usdExchange; 25 | 26 | private float usdExchangeInverse; 27 | 28 | public int getCurrencyOffset() { 29 | return currencyOffset; 30 | } 31 | 32 | public String getUserCurrency() { 33 | return userCurrency; 34 | } 35 | 36 | public float getUsdExchange() { 37 | return usdExchange; 38 | } 39 | 40 | public float getUsdExchangeInverse() { 41 | return usdExchangeInverse; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/Device.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | public class Device extends FacebookObject { 19 | 20 | private String hardware; 21 | 22 | private String os; 23 | 24 | public String getHardware() { 25 | return hardware; 26 | } 27 | 28 | public String getOS() { 29 | return os; 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/EventInvitee.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | /** 19 | * Model class representing someone who has been invited to an event. 20 | * @author Craig Walls 21 | */ 22 | public class EventInvitee extends FacebookObject { 23 | 24 | private String id; 25 | 26 | private String name; 27 | 28 | private RsvpStatus rsvpStatus; 29 | 30 | /** 31 | * @return the invitee's user ID. 32 | */ 33 | public String getId() { 34 | return id; 35 | } 36 | 37 | /** 38 | * @return the invitee's name. 39 | */ 40 | public String getName() { 41 | return name; 42 | } 43 | 44 | /** 45 | * @return the invitee's RSVP status (attending, unsure, not-replied, or declined). 46 | */ 47 | public RsvpStatus getRsvpStatus() { 48 | return rsvpStatus; 49 | } 50 | 51 | } 52 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/Experience.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | import java.io.Serializable; 19 | import java.util.List; 20 | 21 | 22 | /** 23 | * Model class representing an experience. 24 | * @author Craig Walls 25 | */ 26 | @SuppressWarnings("serial") 27 | public class Experience extends FacebookObject implements Serializable { 28 | 29 | private String id; 30 | 31 | private String description; 32 | 33 | private String name; 34 | 35 | private Reference from; 36 | 37 | private List with; 38 | 39 | public String getId() { 40 | return id; 41 | } 42 | 43 | public String getDescription() { 44 | return description; 45 | } 46 | 47 | public String getName() { 48 | return name; 49 | } 50 | 51 | public Reference getFrom() { 52 | return from; 53 | } 54 | 55 | public List getWith() { 56 | return with; 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FamilyMember.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | public class FamilyMember extends Reference { 19 | 20 | private static final long serialVersionUID = 1L; 21 | 22 | private final String relationship; 23 | 24 | public FamilyMember(String id, String name, String relationship) { 25 | super(id, name); 26 | this.relationship = relationship; 27 | } 28 | 29 | public String getRelationship() { 30 | return relationship; 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FqlException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | /** 19 | * Exception indicating a problem with performing an FQL query. 20 | * @author habuma 21 | */ 22 | @SuppressWarnings("serial") 23 | public class FqlException extends RuntimeException { 24 | 25 | public FqlException(String message) { 26 | super(message); 27 | } 28 | 29 | public FqlException(String message, Throwable cause) { 30 | super(message, cause); 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FqlResultMapper.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | /** 19 | * An interface used by FqlTemplate to map FQL results to objects of a specific type, on a per-object basis. 20 | * Roughly analogous to a RowMapper used with Spring's JdbcTemplate. 21 | * @author habuma 22 | * @param the type of object to map FQL result data to. 23 | */ 24 | public interface FqlResultMapper { 25 | 26 | T mapObject(FqlResult objectValues); 27 | 28 | } 29 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/FriendList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | public class FriendList extends Reference { 19 | 20 | private static final long serialVersionUID = 1L; 21 | 22 | private final String listType; 23 | 24 | public FriendList(String id, String name, String listType) { 25 | super(id, name); 26 | this.listType = listType; 27 | } 28 | 29 | public String getListType() { 30 | return listType; 31 | } 32 | 33 | } 34 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/GroupMemberReference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | 19 | /** 20 | * Model class representing a reference to a group member. 21 | * @author Craig Walls 22 | */ 23 | public class GroupMemberReference extends Reference { 24 | 25 | private static final long serialVersionUID = 1L; 26 | 27 | private final boolean administrator; 28 | 29 | public GroupMemberReference(String id, String name, boolean administrator) { 30 | super(id, name); 31 | this.administrator = administrator; 32 | } 33 | 34 | public boolean isAdministrator() { 35 | return administrator; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/ImageSource.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | /** 19 | * A domain type representing an image source. 20 | * 21 | * @author Craig Walls 22 | * @since 2.0 23 | */ 24 | public class ImageSource { 25 | 26 | private final String source; 27 | 28 | private final int height; 29 | 30 | private final int width; 31 | 32 | public ImageSource(String source, int height, int width) { 33 | this.source = source; 34 | this.height = height; 35 | this.width = width; 36 | } 37 | 38 | /** 39 | * @return a URL to the image source 40 | */ 41 | public String getSource() { 42 | return source; 43 | } 44 | 45 | /** 46 | * @return the image height 47 | */ 48 | public int getHeight() { 49 | return height; 50 | } 51 | 52 | /** 53 | * @return the image width 54 | */ 55 | public int getWidth() { 56 | return width; 57 | } 58 | 59 | } 60 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/ImageType.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | public enum ImageType { 19 | SMALL, NORMAL, LARGE, SQUARE, THUMBNAIL, ALBUM 20 | } 21 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/ListAndCount.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | import java.util.List; 19 | 20 | /** 21 | * Contains a list of comments and a count of the total number of comments for a post or checkin. 22 | * This type is not intended for direct use and is not exposed by either the Post or Checkin type. 23 | * Instead, the comments list and count are available through Comment.getComments(), Post.getComments(), and Post.getCommentCount(). 24 | * @author habuma 25 | */ 26 | public class ListAndCount { 27 | 28 | private final List list; 29 | 30 | private final int count; 31 | 32 | public ListAndCount(List list, int count) { 33 | this.list = list; 34 | this.count = count; 35 | } 36 | 37 | public int getCount() { 38 | return count; 39 | } 40 | 41 | public List getList() { 42 | return list; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/ListenActionMetadata.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | import org.springframework.util.MultiValueMap; 19 | 20 | public class ListenActionMetadata extends ActionMetadata { 21 | 22 | private Boolean paused; 23 | 24 | private String viaUser; 25 | 26 | public ListenActionMetadata() { 27 | super(); 28 | } 29 | 30 | public ListenActionMetadata paused(boolean paused) { 31 | this.paused = paused; 32 | return this; 33 | } 34 | 35 | public ListenActionMetadata via(String userId) { 36 | this.viaUser = userId; 37 | return this; 38 | } 39 | 40 | @Override 41 | public MultiValueMap toParameters() { 42 | MultiValueMap params = super.toParameters(); 43 | setIfNotNull(params, "via_user", viaUser); 44 | setIfBooleanNotNull(params, "paused", paused); 45 | return params; 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/MessageTag.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | public class MessageTag extends FacebookObject { 19 | 20 | private final String id; 21 | 22 | private final String name; 23 | 24 | private final String type; 25 | 26 | private final Integer offset; 27 | 28 | private final Integer length; 29 | 30 | public MessageTag(String id, String name, String type, Integer offset, Integer length) { 31 | this.id = id; 32 | this.name = name; 33 | this.type = type; 34 | this.offset = offset; 35 | this.length = length; 36 | } 37 | 38 | public String getId() { 39 | return id; 40 | } 41 | 42 | public String getName() { 43 | return name; 44 | } 45 | 46 | public String getType() { 47 | return type; 48 | } 49 | 50 | public Integer getOffset() { 51 | return offset; 52 | } 53 | 54 | public Integer getLength() { 55 | return length; 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/MissingNamespaceException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | import org.springframework.social.ApiException; 19 | 20 | /** 21 | * Exception indicating that an attempt was made to publish an OpenGraph action without specifying an application namespace. 22 | * @author habuma 23 | */ 24 | @SuppressWarnings("serial") 25 | public class MissingNamespaceException extends ApiException { 26 | 27 | public MissingNamespaceException() { 28 | super("facebook", "An application namespace is required to publish OpenGraph actions."); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/NotAFriendException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | import org.springframework.social.OperationNotPermittedException; 19 | 20 | /** 21 | * Exception thrown when attempting an operation that requires a target user to be a friend of the authenticated user. 22 | * @author Craig Walls 23 | */ 24 | @SuppressWarnings("serial") 25 | public class NotAFriendException extends OperationNotPermittedException { 26 | 27 | public NotAFriendException(String message) { 28 | super("facebook", message); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/PageAdministrationException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | import org.springframework.social.OperationNotPermittedException; 19 | 20 | /** 21 | * Exception thrown when attempting to perform an operation on a page by a user who is not a page administrator. 22 | * @author Craig Walls 23 | */ 24 | @SuppressWarnings("serial") 25 | public class PageAdministrationException extends OperationNotPermittedException { 26 | 27 | public PageAdministrationException(String pageId) { 28 | super("facebook", "The user is not an administrator of the page with ID " + pageId); 29 | } 30 | 31 | } 32 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/PageParking.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | public class PageParking { 19 | 20 | private boolean lot; 21 | 22 | private boolean street; 23 | 24 | private boolean valet; 25 | 26 | public boolean hasLot() { 27 | return lot; 28 | } 29 | 30 | public boolean hasStreet() { 31 | return street; 32 | } 33 | 34 | public boolean hasValet() { 35 | return valet; 36 | } 37 | 38 | } 39 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/PagePaymentOptions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | public class PagePaymentOptions { 19 | 20 | private boolean amex; 21 | 22 | private boolean cashOnly; 23 | 24 | private boolean discover; 25 | 26 | private boolean mastercard; 27 | 28 | private boolean visa; 29 | 30 | public boolean acceptsAmex() { 31 | return amex; 32 | } 33 | 34 | public boolean acceptsCashOnly() { 35 | return cashOnly; 36 | } 37 | 38 | public boolean acceptsDiscover() { 39 | return discover; 40 | } 41 | 42 | public boolean acceptsMastercard() { 43 | return mastercard; 44 | } 45 | 46 | public boolean acceptsVisa() { 47 | return visa; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/PageRestaurantSpecialties.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | public class PageRestaurantSpecialties { 19 | 20 | private boolean breakfast; 21 | 22 | private boolean coffee; 23 | 24 | private boolean dinner; 25 | 26 | private boolean drinks; 27 | 28 | private boolean lunch; 29 | 30 | public boolean hasBreakfast() { 31 | return breakfast; 32 | } 33 | 34 | public boolean hasCoffee() { 35 | return coffee; 36 | } 37 | 38 | public boolean hasDinner() { 39 | return dinner; 40 | } 41 | 42 | public boolean hasDrinks() { 43 | return drinks; 44 | } 45 | 46 | public boolean hasLunch() { 47 | return lunch; 48 | } 49 | 50 | } 51 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/PagedList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | import java.util.List; 19 | 20 | public class PagedList extends CountedList { 21 | private static final long serialVersionUID = 1L; 22 | 23 | private final PagingParameters previousPage; 24 | 25 | private final PagingParameters nextPage; 26 | 27 | public PagedList(List unpagedList, PagingParameters previousPage, PagingParameters nextPage) { 28 | this(unpagedList, previousPage, nextPage, null); 29 | } 30 | 31 | public PagedList(List unpagedList, PagingParameters previousPage, PagingParameters nextPage, Integer totalCount) { 32 | super(unpagedList, totalCount); 33 | this.previousPage = previousPage; 34 | this.nextPage = nextPage; 35 | } 36 | 37 | public PagingParameters getPreviousPage() { 38 | return previousPage; 39 | } 40 | 41 | public PagingParameters getNextPage() { 42 | return nextPage; 43 | } 44 | 45 | } 46 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/PaymentPricePoint.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | /** 19 | * Domain type representing a payment price point. 20 | * 21 | * @author Craig Walls 22 | */ 23 | public class PaymentPricePoint extends FacebookObject { 24 | 25 | private float credits; 26 | 27 | private String localCurrency; 28 | 29 | private String userPrice; 30 | 31 | public float getCredits() { 32 | return credits; 33 | } 34 | 35 | public String getLocalCurrency() { 36 | return localCurrency; 37 | } 38 | 39 | public String getUserPrice() { 40 | return userPrice; 41 | } 42 | 43 | } 44 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/PaymentPricePoints.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | import java.util.List; 19 | 20 | /** 21 | * Domain type carrying lists payment price points. 22 | * Currently only includes payment price points for mobile. 23 | * 24 | * @author Craig Walls 25 | */ 26 | public class PaymentPricePoints extends FacebookObject { 27 | 28 | private List mobile; 29 | 30 | /** 31 | * @return a list of {@link PaymentPricePoint} for mobile. 32 | */ 33 | public List getMobile() { 34 | return mobile; 35 | } 36 | 37 | } 38 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/Place.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | /** 19 | * Domain object representing a place. 20 | * 21 | * @author Paul John 22 | * @author Craig Walls 23 | */ 24 | public class Place extends FacebookObject { 25 | 26 | private String id; 27 | 28 | private Location location; 29 | 30 | private String name; 31 | 32 | public String getId() { 33 | return id; 34 | } 35 | 36 | public String getName() { 37 | return name; 38 | } 39 | 40 | public Location getLocation() { 41 | return location; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/PlaceTag.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | import java.util.Date; 19 | 20 | public class PlaceTag { 21 | 22 | private final String id; 23 | 24 | private final Date createdTime; 25 | 26 | private final Page place; 27 | 28 | public PlaceTag(String id, Date createdTime, Page place) { 29 | this.id = id; 30 | this.createdTime = createdTime; 31 | this.place = place; 32 | } 33 | 34 | public String getId() { 35 | return id; 36 | } 37 | 38 | public Date getCreatedTime() { 39 | return createdTime; 40 | } 41 | 42 | public Page getPlace() { 43 | return place; 44 | } 45 | 46 | } 47 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/PostProperty.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | public class PostProperty { 19 | 20 | private final String name; 21 | 22 | private final String text; 23 | 24 | private final String href; 25 | 26 | public PostProperty(String name, String text, String href) { 27 | this.name = name; 28 | this.text = text; 29 | this.href = href; 30 | } 31 | 32 | public String getName() { 33 | return name; 34 | } 35 | 36 | public String getText() { 37 | return text; 38 | } 39 | 40 | public String getHref() { 41 | return href; 42 | } 43 | 44 | } 45 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/Reference.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | import java.io.Serializable; 19 | 20 | /** 21 | * A simple reference to another Facebook object without the complete set of object data. 22 | * @author Craig Walls 23 | */ 24 | @SuppressWarnings("serial") 25 | public class Reference extends FacebookObject implements Serializable { 26 | 27 | private final String id; 28 | 29 | private final String name; 30 | 31 | @SuppressWarnings("unused") 32 | private Reference() { 33 | this(null, null); 34 | } 35 | 36 | public Reference(String id) { 37 | this(id, null); 38 | } 39 | 40 | public Reference(String id, String name) { 41 | this.id = id; 42 | this.name = name; 43 | } 44 | 45 | public String getId() { 46 | return id; 47 | } 48 | 49 | public String getName() { 50 | return name; 51 | } 52 | 53 | } 54 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/ResourceOwnershipException.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | import org.springframework.social.OperationNotPermittedException; 19 | 20 | /** 21 | * Exception thrown when attempting to perform operation on a resource that must be owned by the authenticated user, 22 | * but is not. For example, attempting to delete someone else's friendlist. 23 | * @author Craig Walls 24 | */ 25 | @SuppressWarnings("serial") 26 | public class ResourceOwnershipException extends OperationNotPermittedException { 27 | 28 | public ResourceOwnershipException(String message) { 29 | super("facebook", message); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/RsvpStatus.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | /** 19 | * Enumeration of statuses that an invitee may have for an event. 20 | * @author Craig Walls 21 | */ 22 | public enum RsvpStatus { 23 | ATTENDING, DECLINED, MAYBE, NOT_REPLIED, UNKNOWN; 24 | } 25 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/SecuritySettings.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | /** 19 | * Domain type representing security settings. 20 | * 21 | * @author Craig Walls 22 | */ 23 | public class SecuritySettings extends FacebookObject { 24 | 25 | private SecureBrowsing secureBrowsing; 26 | 27 | public SecureBrowsing getSecureBrowsing() { 28 | return secureBrowsing; 29 | } 30 | 31 | public static final class SecureBrowsing extends FacebookObject { 32 | 33 | private boolean enabled; 34 | 35 | public boolean isEnabled() { 36 | return enabled; 37 | } 38 | 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/TestUser.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | public class TestUser { 19 | 20 | private String id; 21 | 22 | private String email; 23 | 24 | private String password; 25 | 26 | private String accessToken; 27 | 28 | private String loginUrl; 29 | 30 | public TestUser(String id, String email, String password, String accessToken, String loginUrl) { 31 | this.id = id; 32 | this.email = email; 33 | this.password = password; 34 | this.accessToken = accessToken; 35 | this.loginUrl = loginUrl; 36 | } 37 | 38 | public String getId() { 39 | return id; 40 | } 41 | 42 | public String getEmail() { 43 | return email; 44 | } 45 | 46 | public String getPassword() { 47 | return password; 48 | } 49 | 50 | public String getAccessToken() { 51 | return accessToken; 52 | } 53 | 54 | public String getLoginUrl() { 55 | return loginUrl; 56 | } 57 | 58 | } 59 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/TestUserList.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | import java.util.ArrayList; 19 | import java.util.List; 20 | 21 | import com.fasterxml.jackson.annotation.JsonAnySetter; 22 | import com.fasterxml.jackson.annotation.JsonProperty; 23 | 24 | /** 25 | * @author vmotolyzhenko 26 | */ 27 | public class TestUserList extends FacebookObject { 28 | @JsonProperty("data") 29 | private List testUsers = new ArrayList<>(); 30 | 31 | public List getTestUsers() { 32 | return testUsers; 33 | } 34 | 35 | public void setTestUsers(List testUsers) { 36 | this.testUsers = testUsers; 37 | } 38 | 39 | @Override 40 | @JsonAnySetter 41 | protected void add(String key, Object value) { 42 | super.add(key, value); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/TestUserOperations.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | import java.util.List; 19 | 20 | public interface TestUserOperations { 21 | 22 | TestUser createTestUser(boolean installed, String permissions); 23 | 24 | TestUser createTestUser(boolean installed, String permissions, String name); 25 | 26 | List getTestUsers(); 27 | 28 | void sendConfirmFriends(TestUser user1, TestUser user2); 29 | 30 | void deleteTestUser(String testUserId); 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/UserIdForApp.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | public class UserIdForApp extends FacebookObject { 19 | 20 | private final String id; 21 | private final Reference app; 22 | 23 | public UserIdForApp(String id, Reference app) { 24 | this.id = id; 25 | this.app = app; 26 | } 27 | 28 | public String getId() { 29 | return id; 30 | } 31 | 32 | public Reference getApp() { 33 | return app; 34 | } 35 | 36 | } 37 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/VideoUploadLimits.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api; 17 | 18 | /** 19 | * Domain type describing limits on the time length and size of videos that can be uploaded. 20 | * @author Craig Walls 21 | */ 22 | public class VideoUploadLimits extends FacebookObject { 23 | 24 | private final long length; 25 | 26 | private final long size; 27 | 28 | public VideoUploadLimits(long length, long size) { 29 | this.length = length; 30 | this.size = size; 31 | } 32 | 33 | public long getLength() { 34 | return length; 35 | } 36 | 37 | public long getSize() { 38 | return size; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/AbstractFacebookOperations.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl; 17 | 18 | import org.springframework.social.MissingAuthorizationException; 19 | 20 | class AbstractFacebookOperations { 21 | 22 | private final boolean isAuthorized; 23 | 24 | public AbstractFacebookOperations(boolean isAuthorized) { 25 | this.isAuthorized = isAuthorized; 26 | } 27 | 28 | protected void requireAuthorization() { 29 | if (!isAuthorized) { 30 | throw new MissingAuthorizationException("facebook"); 31 | } 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/ListDeserializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl; 17 | 18 | import java.util.List; 19 | 20 | import com.fasterxml.jackson.databind.JsonNode; 21 | 22 | /** 23 | * Strategy interface for deserializing lists of data returned from Facebook as JSON. 24 | * @author Craig Walls 25 | */ 26 | interface ListDeserializer { 27 | 28 | List deserializeList(JsonNode jsonNode, Class type); 29 | 30 | } 31 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/AccountMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 19 | import com.fasterxml.jackson.annotation.JsonProperty; 20 | 21 | @JsonIgnoreProperties(ignoreUnknown = true) 22 | abstract class AccountMixin extends FacebookObjectMixin { 23 | 24 | @JsonProperty("id") 25 | String id; 26 | 27 | @JsonProperty("name") 28 | String name; 29 | 30 | @JsonProperty("category") 31 | String category; 32 | 33 | @JsonProperty("access_token") 34 | String accessToken; 35 | 36 | @JsonProperty("perms") 37 | String permissions; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/ActionMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonCreator; 19 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 20 | import com.fasterxml.jackson.annotation.JsonProperty; 21 | 22 | @JsonIgnoreProperties(ignoreUnknown = true) 23 | abstract class ActionMixin { 24 | 25 | @JsonCreator 26 | ActionMixin( 27 | @JsonProperty("name") String name, 28 | @JsonProperty("link") String link) {} 29 | 30 | } 31 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/ApplicationReferenceMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonCreator; 19 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 20 | import com.fasterxml.jackson.annotation.JsonProperty; 21 | 22 | @JsonIgnoreProperties(ignoreUnknown = true) 23 | abstract class ApplicationReferenceMixin extends FacebookObjectMixin { 24 | 25 | @JsonCreator 26 | ApplicationReferenceMixin( 27 | @JsonProperty("id") String id, 28 | @JsonProperty("name") String name, 29 | @JsonProperty("url") String url) {} 30 | 31 | } 32 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/CoverPhotoMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 19 | import com.fasterxml.jackson.annotation.JsonProperty; 20 | 21 | @JsonIgnoreProperties(ignoreUnknown = true) 22 | abstract class CoverPhotoMixin extends FacebookObjectMixin { 23 | 24 | @JsonProperty("cover_id") 25 | String id; 26 | 27 | @JsonProperty("source") 28 | String source; 29 | 30 | @JsonProperty("offset_x") 31 | int offsetX; 32 | 33 | @JsonProperty("offset_y") 34 | int offsetY; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/CurrencyMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 19 | import com.fasterxml.jackson.annotation.JsonProperty; 20 | 21 | @JsonIgnoreProperties(ignoreUnknown = true) 22 | abstract class CurrencyMixin extends FacebookObjectMixin { 23 | 24 | @JsonProperty("currency_offset") 25 | int currencyOffset; 26 | 27 | @JsonProperty("user_currency") 28 | String userCurrency; 29 | 30 | @JsonProperty("usd_exchange") 31 | float usdExchange; 32 | 33 | @JsonProperty("usd_exchange_inverse") 34 | float usdExchangeInverse; 35 | 36 | } 37 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/DeviceMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 19 | import com.fasterxml.jackson.annotation.JsonProperty; 20 | 21 | @JsonIgnoreProperties(ignoreUnknown = true) 22 | abstract class DeviceMixin extends FacebookObjectMixin { 23 | 24 | @JsonProperty("hardware") 25 | String hardware; 26 | 27 | @JsonProperty("os") 28 | String os; 29 | 30 | } 31 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/EngagementMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 19 | import com.fasterxml.jackson.annotation.JsonProperty; 20 | 21 | @JsonIgnoreProperties(ignoreUnknown = true) 22 | abstract class EngagementMixin extends FacebookObjectMixin { 23 | 24 | @JsonProperty("count") 25 | int count; 26 | 27 | @JsonProperty("count_string") 28 | String countString; 29 | 30 | @JsonProperty("count_string_with_like") 31 | String countStringWithLike; 32 | 33 | @JsonProperty("count_string_without_like") 34 | String countStringWithoutLike; 35 | 36 | @JsonProperty("social_sentence") 37 | String socialSentence; 38 | 39 | @JsonProperty("social_sentence_with_like") 40 | String socialSentenceWithLike; 41 | 42 | @JsonProperty("social_sentence_without_like") 43 | String socialSentenceWithoutLike; 44 | 45 | } 46 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/EventInviteeMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import org.springframework.social.facebook.api.RsvpStatus; 19 | 20 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 21 | import com.fasterxml.jackson.annotation.JsonProperty; 22 | import com.fasterxml.jackson.databind.annotation.JsonDeserialize; 23 | 24 | /** 25 | * Annotated mixin to add Jackson annotations to EventInvitee. 26 | * @author Craig Walls 27 | */ 28 | @JsonIgnoreProperties(ignoreUnknown = true) 29 | abstract class EventInviteeMixin extends FacebookObjectMixin { 30 | 31 | @JsonProperty("id") 32 | String id; 33 | 34 | @JsonProperty("name") 35 | String name; 36 | 37 | @JsonProperty("rsvp_status") 38 | @JsonDeserialize(using=RsvpStatusDeserializer.class) 39 | RsvpStatus rsvpStatus; 40 | 41 | } 42 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/ExperienceMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import java.util.List; 19 | 20 | import org.springframework.social.facebook.api.Reference; 21 | 22 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 23 | import com.fasterxml.jackson.annotation.JsonProperty; 24 | 25 | @JsonIgnoreProperties(ignoreUnknown = true) 26 | abstract class ExperienceMixin extends FacebookObjectMixin { 27 | 28 | @JsonProperty("id") 29 | String id; 30 | 31 | @JsonProperty("description") 32 | String description; 33 | 34 | @JsonProperty("name") 35 | String name; 36 | 37 | @JsonProperty("from") 38 | Reference from; 39 | 40 | @JsonProperty("with") 41 | List with; 42 | 43 | 44 | } 45 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/FacebookObjectMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonAnySetter; 19 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 20 | 21 | /** 22 | * Annotated mixin to add Jackson annotations to FacebookObject. 23 | * @author Craig Walls 24 | */ 25 | @JsonIgnoreProperties(ignoreUnknown = true) 26 | abstract class FacebookObjectMixin { 27 | 28 | @JsonAnySetter 29 | abstract void add(String key, Object value); 30 | 31 | } 32 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/FamilyMemberMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonCreator; 19 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 20 | import com.fasterxml.jackson.annotation.JsonProperty; 21 | 22 | /** 23 | * Annotated mixin to add Jackson annotations to FamilyMember. 24 | * @author Craig Walls 25 | */ 26 | @JsonIgnoreProperties(ignoreUnknown = true) 27 | abstract class FamilyMemberMixin extends FacebookObjectMixin { 28 | 29 | @JsonCreator 30 | FamilyMemberMixin( 31 | @JsonProperty("id") String id, 32 | @JsonProperty("name") String name, 33 | @JsonProperty("relationship") String relationship) {} 34 | } 35 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/FriendListMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import org.springframework.social.facebook.api.FacebookObject; 19 | 20 | import com.fasterxml.jackson.annotation.JsonCreator; 21 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 22 | import com.fasterxml.jackson.annotation.JsonProperty; 23 | 24 | /** 25 | * Annotated mixin to add Jackson annotations to Reference. 26 | * @author Craig Walls 27 | */ 28 | @JsonIgnoreProperties(ignoreUnknown = true) 29 | abstract class FriendListMixin extends FacebookObject { 30 | 31 | @JsonCreator 32 | FriendListMixin( 33 | @JsonProperty("id") String id, 34 | @JsonProperty("name") String name, 35 | @JsonProperty("list_type") String listType) {} 36 | 37 | } 38 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/GroupMemberReferenceMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonCreator; 19 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 20 | import com.fasterxml.jackson.annotation.JsonProperty; 21 | 22 | /** 23 | * Annotated mixin to add Jackson annotations to GroupMemberReference. 24 | * @author Craig Walls 25 | */ 26 | @JsonIgnoreProperties(ignoreUnknown = true) 27 | abstract class GroupMemberReferenceMixin extends FacebookObjectMixin { 28 | 29 | @JsonCreator 30 | GroupMemberReferenceMixin( 31 | @JsonProperty("id") String id, 32 | @JsonProperty("name") String name, 33 | @JsonProperty("administrator") boolean administrator) {} 34 | 35 | } 36 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/GroupMembershipMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonCreator; 19 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 20 | import com.fasterxml.jackson.annotation.JsonProperty; 21 | 22 | /** 23 | * Annotated mixin to add Jackson annotations to GroupMembership. 24 | * @author Craig Walls 25 | */ 26 | @JsonIgnoreProperties(ignoreUnknown = true) 27 | abstract class GroupMembershipMixin extends FacebookObjectMixin { 28 | 29 | @JsonCreator 30 | GroupMembershipMixin( 31 | @JsonProperty("id") String id, 32 | @JsonProperty("name") String name, 33 | @JsonProperty("bookmark_order") int bookmarkOrder, 34 | @JsonProperty("administrator") boolean administrator) {} 35 | 36 | @JsonProperty("unread") 37 | int unread; 38 | } 39 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/ImageSourceMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 19 | import com.fasterxml.jackson.annotation.JsonProperty; 20 | 21 | @JsonIgnoreProperties(ignoreUnknown = true) 22 | abstract class ImageSourceMixin { 23 | 24 | ImageSourceMixin( 25 | @JsonProperty("src") String source, 26 | @JsonProperty("height") int height, 27 | @JsonProperty("width") int width) {} 28 | 29 | } 30 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/MessageTagMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonCreator; 19 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 20 | import com.fasterxml.jackson.annotation.JsonProperty; 21 | 22 | /** 23 | * Annotated mixin to add Jackson annotations to StoryTag. 24 | * @author Robert Drysdale 25 | * @author Craig Walls 26 | */ 27 | @JsonIgnoreProperties(ignoreUnknown = true) 28 | abstract class MessageTagMixin extends FacebookObjectMixin { 29 | 30 | @JsonCreator 31 | MessageTagMixin( 32 | @JsonProperty("id") String id, 33 | @JsonProperty("name") String name, 34 | @JsonProperty("type") String type, 35 | @JsonProperty("offset") Integer offset, 36 | @JsonProperty("length") Integer length) {} 37 | 38 | } 39 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/PageParkingMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 19 | import com.fasterxml.jackson.annotation.JsonProperty; 20 | 21 | @JsonIgnoreProperties(ignoreUnknown = true) 22 | abstract class PageParkingMixin { 23 | 24 | @JsonProperty("lot") 25 | boolean lot; 26 | 27 | @JsonProperty("street") 28 | boolean street; 29 | 30 | @JsonProperty("valet") 31 | boolean valet; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/PagePaymentOptionsMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 19 | import com.fasterxml.jackson.annotation.JsonProperty; 20 | 21 | @JsonIgnoreProperties(ignoreUnknown = true) 22 | abstract class PagePaymentOptionsMixin { 23 | 24 | @JsonProperty("amex") 25 | boolean amex; 26 | 27 | @JsonProperty("cash_only") 28 | boolean cashOnly; 29 | 30 | @JsonProperty("discover") 31 | boolean discover; 32 | 33 | @JsonProperty("mastercard") 34 | boolean mastercard; 35 | 36 | @JsonProperty("visa") 37 | boolean visa; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/PageRestaurantServicesMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 19 | import com.fasterxml.jackson.annotation.JsonProperty; 20 | 21 | @JsonIgnoreProperties(ignoreUnknown = true) 22 | abstract class PageRestaurantServicesMixin { 23 | 24 | @JsonProperty("catering") 25 | boolean catering; 26 | 27 | @JsonProperty("delivery") 28 | boolean delivery; 29 | 30 | @JsonProperty("groups") 31 | boolean groups; 32 | 33 | @JsonProperty("kids") 34 | boolean kids; 35 | 36 | @JsonProperty("outdoor") 37 | boolean outdoor; 38 | 39 | @JsonProperty("reserve") 40 | boolean reserve; 41 | 42 | @JsonProperty("takeout") 43 | boolean takeout; 44 | 45 | @JsonProperty("waiter") 46 | boolean waiter; 47 | 48 | @JsonProperty("walkins") 49 | boolean walkins; 50 | 51 | } 52 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/PaymentPricePointMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 19 | import com.fasterxml.jackson.annotation.JsonProperty; 20 | 21 | @JsonIgnoreProperties(ignoreUnknown = true) 22 | abstract class PaymentPricePointMixin extends FacebookObjectMixin { 23 | 24 | @JsonProperty("credits") 25 | float credits; 26 | 27 | @JsonProperty("local_currency") 28 | String localCurrency; 29 | 30 | @JsonProperty("user_price") 31 | String userPrice; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/PaymentPricePointsMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import java.util.List; 19 | 20 | import org.springframework.social.facebook.api.PaymentPricePoint; 21 | 22 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 23 | import com.fasterxml.jackson.annotation.JsonProperty; 24 | 25 | @JsonIgnoreProperties(ignoreUnknown = true) 26 | abstract class PaymentPricePointsMixin extends FacebookObjectMixin { 27 | 28 | @JsonProperty("mobile") 29 | List mobile; 30 | 31 | } 32 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/PictureDeserializer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import java.io.IOException; 19 | 20 | import com.fasterxml.jackson.core.JsonParser; 21 | import com.fasterxml.jackson.core.JsonProcessingException; 22 | import com.fasterxml.jackson.databind.DeserializationContext; 23 | import com.fasterxml.jackson.databind.JsonDeserializer; 24 | import com.fasterxml.jackson.databind.JsonNode; 25 | 26 | class PictureDeserializer extends JsonDeserializer { 27 | 28 | @Override 29 | public String deserialize(JsonParser jp, DeserializationContext ctxt) throws IOException, JsonProcessingException { 30 | JsonNode node = jp.readValueAs(JsonNode.class); 31 | if (node.isObject() && node.has("data")) { 32 | return node.get("data").get("url").asText(); 33 | } else if (node.isTextual()) { 34 | return node.asText(); 35 | } 36 | return null; 37 | } 38 | 39 | } 40 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/PlaceMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import org.springframework.social.facebook.api.Location; 19 | 20 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 21 | import com.fasterxml.jackson.annotation.JsonProperty; 22 | 23 | /** 24 | * Annotated mixin to add Jackson annotations to Place. 25 | * @author Craig Walls 26 | */ 27 | @JsonIgnoreProperties(ignoreUnknown = true) 28 | abstract class PlaceMixin extends FacebookObjectMixin { 29 | 30 | @JsonProperty("id") 31 | String id; 32 | 33 | @JsonProperty("name") 34 | String name; 35 | 36 | @JsonProperty("location") 37 | Location location; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/PlaceTagMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import java.util.Date; 19 | 20 | import org.springframework.social.facebook.api.Page; 21 | 22 | import com.fasterxml.jackson.annotation.JsonCreator; 23 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 24 | import com.fasterxml.jackson.annotation.JsonProperty; 25 | 26 | /** 27 | * Annotated mixin to add Jackson annotations to Tag. 28 | * @author Craig Walls 29 | */ 30 | @JsonIgnoreProperties(ignoreUnknown = true) 31 | abstract class PlaceTagMixin extends FacebookObjectMixin { 32 | 33 | @JsonCreator 34 | PlaceTagMixin( 35 | @JsonProperty("id") String id, 36 | @JsonProperty("created_time") Date createdTime, 37 | @JsonProperty("place") Page place) {} 38 | 39 | } 40 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/PostPropertyMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonCreator; 19 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 20 | import com.fasterxml.jackson.annotation.JsonProperty; 21 | 22 | @JsonIgnoreProperties(ignoreUnknown = true) 23 | public class PostPropertyMixin { 24 | 25 | @JsonCreator 26 | public PostPropertyMixin( 27 | @JsonProperty("name") String name, 28 | @JsonProperty("text") String text, 29 | @JsonProperty("href") String href) {} 30 | 31 | } 32 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/ProfilePictureSourceMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import org.springframework.social.facebook.api.FacebookObject; 19 | 20 | import com.fasterxml.jackson.annotation.JsonCreator; 21 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 22 | import com.fasterxml.jackson.annotation.JsonProperty; 23 | 24 | /** 25 | * Annotated mixin to add Jackson annotations to ProfilePictureSource. 26 | * @author Craig Walls 27 | */ 28 | @JsonIgnoreProperties(ignoreUnknown = true) 29 | abstract class ProfilePictureSourceMixin extends FacebookObject { 30 | 31 | @JsonCreator 32 | ProfilePictureSourceMixin( 33 | @JsonProperty("url") String url, 34 | @JsonProperty("width") int width, 35 | @JsonProperty("height") int height, 36 | @JsonProperty("is_silhouette") boolean isSilhouette) {} 37 | 38 | } 39 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/ReferenceMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import org.springframework.social.facebook.api.FacebookObject; 19 | 20 | import com.fasterxml.jackson.annotation.JsonCreator; 21 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 22 | import com.fasterxml.jackson.annotation.JsonProperty; 23 | 24 | /** 25 | * Annotated mixin to add Jackson annotations to Reference. 26 | * @author Craig Walls 27 | */ 28 | @JsonIgnoreProperties(ignoreUnknown = true) 29 | abstract class ReferenceMixin extends FacebookObject { 30 | 31 | @JsonCreator 32 | ReferenceMixin( 33 | @JsonProperty("id") String id, 34 | @JsonProperty("name") String name) {} 35 | } 36 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/RestaurantServicesMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 19 | import com.fasterxml.jackson.annotation.JsonProperty; 20 | 21 | @JsonIgnoreProperties(ignoreUnknown = true) 22 | abstract class RestaurantServicesMixin { 23 | 24 | @JsonProperty("delivery") 25 | boolean delivery; 26 | 27 | @JsonProperty("delivery") 28 | boolean catering; 29 | 30 | @JsonProperty("groups") 31 | boolean groups; 32 | 33 | @JsonProperty("kids") 34 | boolean kids; 35 | 36 | @JsonProperty("outdoor") 37 | boolean outdoor; 38 | 39 | @JsonProperty("reserve") 40 | boolean reservea; 41 | 42 | @JsonProperty("takeout") 43 | boolean takeout; 44 | 45 | @JsonProperty("waiter") 46 | boolean waiter; 47 | 48 | @JsonProperty("walkins") 49 | boolean walkins; 50 | } 51 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/RestaurantSpecialtiesMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 19 | import com.fasterxml.jackson.annotation.JsonProperty; 20 | 21 | @JsonIgnoreProperties(ignoreUnknown = true) 22 | abstract class RestaurantSpecialtiesMixin { 23 | 24 | @JsonProperty("breakfast") 25 | boolean breakfast; 26 | 27 | @JsonProperty("coffee") 28 | boolean coffee; 29 | 30 | @JsonProperty("dinner") 31 | boolean dinner; 32 | 33 | @JsonProperty("drinks") 34 | boolean drinks; 35 | 36 | @JsonProperty("lunch") 37 | boolean lunch; 38 | 39 | } 40 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/SecuritySettingsMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import org.springframework.social.facebook.api.SecuritySettings.SecureBrowsing; 19 | 20 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 21 | import com.fasterxml.jackson.annotation.JsonProperty; 22 | 23 | @JsonIgnoreProperties(ignoreUnknown = true) 24 | abstract class SecuritySettingsMixin extends FacebookObjectMixin { 25 | 26 | @JsonProperty("secure_browsing") 27 | SecureBrowsing secureBrowsing; 28 | 29 | @JsonIgnoreProperties(ignoreUnknown = true) 30 | static abstract class SecureBrowsingMixin extends FacebookObjectMixin { 31 | 32 | @JsonProperty("enabled") 33 | boolean enabled; 34 | 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/TagMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import java.util.Date; 19 | 20 | import com.fasterxml.jackson.annotation.JsonCreator; 21 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 22 | import com.fasterxml.jackson.annotation.JsonProperty; 23 | 24 | /** 25 | * Annotated mixin to add Jackson annotations to Tag. 26 | * @author Craig Walls 27 | */ 28 | @JsonIgnoreProperties(ignoreUnknown = true) 29 | abstract class TagMixin extends FacebookObjectMixin { 30 | 31 | @JsonCreator 32 | TagMixin( 33 | @JsonProperty("id") String id, 34 | @JsonProperty("name") String name, 35 | @JsonProperty("x") Integer x, 36 | @JsonProperty("y") Integer y, 37 | @JsonProperty("created_time") Date createdTime) {} 38 | 39 | } 40 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/TestUserMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonCreator; 19 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 20 | import com.fasterxml.jackson.annotation.JsonProperty; 21 | 22 | @JsonIgnoreProperties(ignoreUnknown = true) 23 | abstract class TestUserMixin { 24 | 25 | @JsonCreator 26 | TestUserMixin( 27 | @JsonProperty("id") String id, 28 | @JsonProperty("email") String email, 29 | @JsonProperty("password") String password, 30 | @JsonProperty("access_token") String accessToken, 31 | @JsonProperty("login_url") String loginUrl) {}; 32 | 33 | } 34 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/UserIdForAppMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import org.springframework.social.facebook.api.FacebookObject; 19 | import org.springframework.social.facebook.api.Reference; 20 | 21 | import com.fasterxml.jackson.annotation.JsonCreator; 22 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 23 | import com.fasterxml.jackson.annotation.JsonProperty; 24 | 25 | /** 26 | * Annotated mixin to add Jackson annotations to UserIdForApp. 27 | * @author Craig Walls 28 | */ 29 | @JsonIgnoreProperties(ignoreUnknown = true) 30 | abstract class UserIdForAppMixin extends FacebookObject { 31 | 32 | @JsonCreator 33 | UserIdForAppMixin( 34 | @JsonProperty("id") String id, 35 | @JsonProperty("app") Reference app) {} 36 | } 37 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/UserInvitableFriendMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import org.springframework.social.facebook.api.FacebookObject; 19 | 20 | import com.fasterxml.jackson.annotation.JsonCreator; 21 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 22 | import com.fasterxml.jackson.annotation.JsonProperty; 23 | 24 | /** 25 | * Annotated mixin to add Jackson annotations to UserInvitableFriend. 26 | * @author Craig Walls 27 | */ 28 | @JsonIgnoreProperties(ignoreUnknown = true) 29 | abstract class UserInvitableFriendMixin extends FacebookObject { 30 | 31 | @JsonCreator 32 | UserInvitableFriendMixin( 33 | @JsonProperty("id") String id, 34 | @JsonProperty("name") String name, 35 | @JsonProperty("first_name") String firstName, 36 | @JsonProperty("middle_name") String middleName, 37 | @JsonProperty("last_name") String lastName) {} 38 | 39 | } 40 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/VideoUploadLimitsMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonCreator; 19 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 20 | import com.fasterxml.jackson.annotation.JsonProperty; 21 | 22 | /** 23 | * Annotated mixin to add Jackson annotations to VideoUploadLimits. 24 | * @author Craig Walls 25 | */ 26 | @JsonIgnoreProperties(ignoreUnknown = true) 27 | abstract class VideoUploadLimitsMixin extends FacebookObjectMixin { 28 | 29 | @JsonCreator 30 | VideoUploadLimitsMixin( 31 | @JsonProperty("length") long length, 32 | @JsonProperty("size") long size) {} 33 | 34 | } 35 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/VoipInfoMixin.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.api.impl.json; 17 | 18 | import com.fasterxml.jackson.annotation.JsonIgnoreProperties; 19 | import com.fasterxml.jackson.annotation.JsonProperty; 20 | 21 | @JsonIgnoreProperties(ignoreUnknown = true) 22 | abstract class VoipInfoMixin extends FacebookObjectMixin { 23 | 24 | @JsonProperty("has_permission") 25 | boolean hasPermission; 26 | 27 | @JsonProperty("has_mobile_app") 28 | boolean hasMobileApp; 29 | 30 | @JsonProperty("is_pushable") 31 | boolean isPushable; 32 | 33 | @JsonProperty("is_callable") 34 | boolean isCallable; 35 | 36 | @JsonProperty("is_callable_webrtc") 37 | boolean isCallableWebRTC; 38 | 39 | @JsonProperty("reason_code") 40 | int reasonCode; 41 | 42 | @JsonProperty("reason_description") 43 | String reasonDescription; 44 | 45 | } 46 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/json/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Jackson mixins, deserializers, and holders for converting Facebook data into API types 3 | */ 4 | package org.springframework.social.facebook.api.impl.json; 5 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/impl/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Implementation of Spring Social's Service API for Facebook 3 | */ 4 | package org.springframework.social.facebook.api.impl; 5 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/api/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Spring Social's Service API for Facebook 3 | */ 4 | package org.springframework.social.facebook.api; 5 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/config/support/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Configuration support classes. 3 | */ 4 | package org.springframework.social.facebook.config.support; 5 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/config/xml/FacebookNamespaceHandler.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.config.xml; 17 | 18 | import org.springframework.beans.factory.xml.NamespaceHandler; 19 | import org.springframework.social.config.xml.AbstractProviderConfigBeanDefinitionParser; 20 | import org.springframework.social.config.xml.AbstractProviderConfigNamespaceHandler; 21 | 22 | /** 23 | * {@link NamespaceHandler} for Spring Social Facebook 24 | * 25 | * @author Craig Walls 26 | */ 27 | public class FacebookNamespaceHandler extends AbstractProviderConfigNamespaceHandler { 28 | 29 | @Override 30 | protected AbstractProviderConfigBeanDefinitionParser getProviderConfigBeanDefinitionParser() { 31 | return new FacebookConfigBeanDefinitionParser(); 32 | } 33 | 34 | } 35 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/config/xml/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Spring Social Facebook's XML configuration namespace. 3 | */ 4 | package org.springframework.social.facebook.config.xml; 5 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/connect/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Facebook service provider connection repository and API adapter implementations. 3 | */ 4 | package org.springframework.social.facebook.connect; 5 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/security/FacebookAuthenticationService.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2015 the original author or authors. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * https://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | package org.springframework.social.facebook.security; 17 | 18 | import org.springframework.social.facebook.api.Facebook; 19 | import org.springframework.social.facebook.connect.FacebookConnectionFactory; 20 | import org.springframework.social.security.provider.OAuth2AuthenticationService; 21 | 22 | public class FacebookAuthenticationService extends OAuth2AuthenticationService { 23 | 24 | public FacebookAuthenticationService(String apiKey, String appSecret) { 25 | super(new FacebookConnectionFactory(apiKey, appSecret)); 26 | } 27 | 28 | public FacebookAuthenticationService(String apiKey, String appSecret, String appNamespace) { 29 | super(new FacebookConnectionFactory(apiKey, appSecret, appNamespace)); 30 | } 31 | 32 | } 33 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/java/org/springframework/social/facebook/security/package-info.java: -------------------------------------------------------------------------------- 1 | /** 2 | * Support classes for integration with Spring Security. 3 | */ 4 | package org.springframework.social.facebook.security; 5 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/resources/META-INF/spring.handlers: -------------------------------------------------------------------------------- 1 | http\://www.springframework.org/schema/social/facebook=org.springframework.social.facebook.config.xml.FacebookNamespaceHandler 2 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/resources/META-INF/spring.schemas: -------------------------------------------------------------------------------- 1 | http\://www.springframework.org/schema/social/spring-social-facebook.xsd=org/springframework/social/facebook/config/xml/spring-social-facebook-1.1.xsd 2 | http\://www.springframework.org/schema/social/spring-social-facebook-1.1.xsd=org/springframework/social/facebook/config/xml/spring-social-facebook-1.1.xsd 3 | -------------------------------------------------------------------------------- /spring-social-facebook/src/main/resources/org/springframework/social/facebook/config/xml/spring-social-facebook-1.1.xsd: -------------------------------------------------------------------------------- 1 | 2 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/accounts.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "name": "Test Page", 5 | "category": "Page", 6 | "id": "987654321", 7 | "access_token": "pageAccessToken" 8 | }, 9 | { 10 | "name": "Test Page 2", 11 | "category": "Page", 12 | "id": "1212121212", 13 | "access_token": "page2AccessToken" 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/achievement-type.json: -------------------------------------------------------------------------------- 1 | { 2 | "application": { 3 | "id": "248041811986157", 4 | "name": "Spring Social Game", 5 | "url": "https://www.facebook.com/apps/application.php?id=248041811986157" 6 | }, 7 | "created_time": "2014-05-29T17:23:36+0000", 8 | "data": { 9 | "points": 50 10 | }, 11 | "description": "He's sneaky in red and white stripes and hiding in crowds, but you found him!", 12 | "id": "651053301631017", 13 | "image": [ 14 | { 15 | "height": 1517, 16 | "url": "https://www.habuma.com/fb/foundwaldo.jpg", 17 | "width": 827 18 | } 19 | ], 20 | "is_scraped": true, 21 | "title": "Found Waldo", 22 | "type": "game.achievement", 23 | "updated_time": "2014-05-29T17:23:36+0000", 24 | "url": "https://www.habuma.com/fb/foundwaldo.html" 25 | } 26 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/achievement.json: -------------------------------------------------------------------------------- 1 | { 2 | "application": { 3 | "id": "248041811986157", 4 | "name": "Spring Social Game", 5 | "namespace": "springgame" 6 | }, 7 | "comments": { 8 | "can_comment": true, 9 | "comment_order": "chronological", 10 | "count": 0 11 | }, 12 | "data": { 13 | "achievement": { 14 | "id": "651053301631017", 15 | "title": "Found Waldo", 16 | "type": "game.achievement", 17 | "url": "https://www.habuma.com/fb/foundwaldo.html" 18 | }, 19 | "importance": 0 20 | }, 21 | "end_time": "2014-06-02T15:56:00+0000", 22 | "from": { 23 | "id": "1401275846826808", 24 | "name": "Carol Amhccbahibha Zuckersky" 25 | }, 26 | "id": "1403833783237681", 27 | "likes": { 28 | "can_like": true, 29 | "count": 0, 30 | "user_likes": false 31 | }, 32 | "publish_time": "2014-06-02T15:56:00+0000", 33 | "start_time": "2014-06-02T15:56:00+0000", 34 | "type": "games.achieves" 35 | } 36 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/activities.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": 3 | [ 4 | { 5 | "name":"Macrame", 6 | "category":"Interest", 7 | "id":"106302979408734", 8 | "created_time":"2011-03-24T17:40:00+0000" 9 | }, 10 | { 11 | "name":"Basket weaving", 12 | "category":"Interest", 13 | "id":"109364789081700", 14 | "created_time":"2011-03-24T17:39:21+0000" 15 | } 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/album-with-unknown-privacy.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"10151447271460580", 3 | "from": 4 | { 5 | "name":"Craig Walls", 6 | "id":"738140579" 7 | }, 8 | "name":"Early Broncos", 9 | "location":"Somewhere", 10 | "link":"https:\/\/www.facebook.com\/album.php?aid=620722&id=738140579", 11 | "cover_photo":"10151447371355580", 12 | "privacy":"networks", 13 | "count":1, 14 | "type":"normal", 15 | "created_time":"2011-03-24T21:36:04+0000", 16 | "updated_time":"2011-03-24T22:00:12+0000" 17 | } 18 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/album-with-unknown-type.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"10151447271460580", 3 | "from": 4 | { 5 | "name":"Craig Walls", 6 | "id":"738140579" 7 | }, 8 | "name":"Early Broncos", 9 | "location":"Somewhere", 10 | "link":"https:\/\/www.facebook.com\/album.php?aid=620722&id=738140579", 11 | "cover_photo":"10151447371355580", 12 | "privacy":"custom", 13 | "count":1, 14 | "type":"bogus", 15 | "created_time":"2011-03-24T21:36:04+0000", 16 | "updated_time":"2011-03-24T22:00:12+0000" 17 | } 18 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/album.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"10151447271460580", 3 | "from": 4 | { 5 | "name":"Craig Walls", 6 | "id":"738140579" 7 | }, 8 | "name":"Early Broncos", 9 | "location":"Somewhere", 10 | "link":"https:\/\/www.facebook.com\/album.php?aid=620722&id=738140579", 11 | "cover_photo":"10151447371355580", 12 | "privacy":"custom", 13 | "count":1, 14 | "type":"normal", 15 | "created_time":"2011-03-24T21:36:04+0000", 16 | "updated_time":"2011-03-24T22:00:12+0000" 17 | } 18 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/all_mutual_friends.json: -------------------------------------------------------------------------------- 1 | { 2 | "context": { 3 | "all_mutual_friends": { 4 | "data": [ 5 | { 6 | "id": "708598160", 7 | "name": "Josh Long" 8 | }, 9 | { 10 | "id": "1255689239", 11 | "name": "Keith Donald" 12 | } 13 | ], 14 | "paging": { 15 | "cursors": { 16 | "before": "NzA4NTk4MTYw", 17 | "after": "MTI1NTY4OTIzOQ==" 18 | } 19 | }, 20 | "summary": { 21 | "total_count": 177 22 | } 23 | } 24 | }, 25 | "id": "738140579" 26 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/application-page.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "140372495981006", 3 | "can_post": true, 4 | "name": "Greenhouse", 5 | "description": "The social destination for Spring application developers.", 6 | "link": "https://www.facebook.com/apps/application.php?id=140372495981006" 7 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/attending.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": 3 | [ 4 | { 5 | "name":"Art Names", 6 | "id":"100001387295207", 7 | "rsvp_status":"attending" 8 | }, 9 | { 10 | "name":"Craig Walls", 11 | "id":"738140579", 12 | "rsvp_status":"attending" 13 | }, 14 | { 15 | "name":"Chuck Wagon", 16 | "id":"975041837", 17 | "rsvp_status":"attending" 18 | } 19 | ] 20 | } 21 | 22 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/checkin-with-string-location.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "10150811140650580", 3 | "from": { 4 | "name": "Craig Walls", 5 | "id": "738140579" 6 | }, 7 | "message": "Many will check in using Facebook today. I am checking in AT Facebook", 8 | "place": { 9 | "id": "218213061560639", 10 | "name": "f8 HACK 2011", 11 | "location": "Facebook", 12 | "start_time": "2011-09-23T11:00:00" 13 | }, 14 | "application": { 15 | "name": "Facebook for iPhone", 16 | "namespace": "fbiphone", 17 | "id": "6628568379" 18 | }, 19 | "created_time": "2011-09-23T18:16:19+0000" 20 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/checkin.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"10150431253050580", 3 | "from": 4 | { 5 | "name":"Craig Walls", 6 | "id":"738140579" 7 | }, 8 | "place": 9 | { 10 | "id":"117372064948189", 11 | "name":"Freebirds World Burrito", 12 | "location": 13 | { 14 | "street":"238 W Campbell Rd", 15 | "city":"Richardson", 16 | "state":"TX", 17 | "country":"United States", 18 | "zip":"75080-3512", 19 | "latitude":32.975537, 20 | "longitude":-96.722944 21 | } 22 | }, 23 | "application": 24 | { 25 | "name":"Facebook for iPhone", 26 | "id":"6628568379" 27 | }, 28 | "created_time":"2011-03-13T01:00:49+0000" 29 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/comment.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"1533260333_122829644452184_587062", 3 | "from": { 4 | "name":"Art Names", 5 | "id":"1533260333" 6 | }, 7 | "message":"Howdy!", 8 | "can_remove": true, 9 | "can_comment": true, 10 | "created_time":"2011-01-17T16:02:09+0000", 11 | "like_count": 4, 12 | "comment_count": 50, 13 | "user_likes": true, 14 | "message_tags": [ 15 | { 16 | "id": "17540", 17 | "name": "Luke Skywalker", 18 | "type": "user", 19 | "offset": 5, 20 | "length": 16 21 | } 22 | ], 23 | "attachment": { 24 | "description": "Some description text", 25 | "type": "share", 26 | "title": "Some title text", 27 | "target": { 28 | "id": "203272_269965", 29 | "url": "https://l.facebook.com/l.php?u=https%3A%2F%2Fsomeurl.com" 30 | }, 31 | "url": "https://someurl.com", 32 | "media": { 33 | "image": { 34 | "height": 500, 35 | "src": "https://someurl.com/image.png", 36 | "width": 200 37 | } 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/comment_preSept2012.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"1533260333_122829644452184_587062", 3 | "from": 4 | { 5 | "name":"Art Names", 6 | "id":"1533260333" 7 | }, 8 | "likes":4, 9 | "message":"Howdy!", 10 | "created_time":"2011-01-17T16:02:09+0000" 11 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/comments.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": 3 | [ 4 | { 5 | "id":"1533260333_122829644452184_587062", 6 | "from": 7 | { 8 | "name":"Art Names", 9 | "id":"1533260333" 10 | }, 11 | "message":"Howdy!", 12 | "created_time":"2011-01-17T16:02:09+0000" 13 | }, 14 | { 15 | "id":"638140578_122829644452184_591322", 16 | "from": 17 | { 18 | "name":"Chuck Wagon", 19 | "id":"638140578" 20 | }, 21 | "message":"The world says hello back", 22 | "created_time":"2011-01-18T05:01:07+0000", 23 | "can_comment": true, 24 | "can_remove": true, 25 | "user_likes": true, 26 | "comment_count": 40, 27 | "like_count": 90 28 | } 29 | ] 30 | } 31 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/create-friend-list.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"11929590579", 3 | "name":"High School Friends" 4 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/declined.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": 3 | [ 4 | { 5 | "name":"Art Names", 6 | "id":"100001387295207", 7 | "rsvp_status":"declined" 8 | }, 9 | { 10 | "name":"Craig Walls", 11 | "id":"738140579", 12 | "rsvp_status":"declined" 13 | }, 14 | { 15 | "name":"Chuck Wagon", 16 | "id":"975041837", 17 | "rsvp_status":"declined" 18 | } 19 | ] 20 | } 21 | 22 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/emptyFeed.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | ] 4 | } 5 | 6 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-1-httpsRequired.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "message": "You must use https:// when passing an access token", 4 | "type": "OAuthException", 5 | "code": 1 6 | } 7 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-10-permissionDenied.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "message": "(#10) To use taggable_friends on behalf of people who are not admins, developers and testers of your app, your use of this endpoint must be reviewed and approved by Facebook. To submit this feature for review please read our documentation on reviewable features: https://developers.facebook.com/docs/apps/review", 4 | "type": "OAuthException", 5 | "code": 10 6 | } 7 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-100-badRequestUrl.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "message": "Unsupported get request. Please read the Graph API documentation at https://developers.facebook.com/docs/graph-api", 4 | "type": "GraphMethodException", 5 | "code": 100 6 | } 7 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-100-nonExistingFields.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "message": "(#100) Tried accessing nonexisting field (fdsfds) on node type (User)", 4 | "type": "OAuthException", 5 | "code": 100 6 | } 7 | } 8 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-104-noAccessToken.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "message": "An access token is required to request this resource.", 4 | "type": "OAuthException", 5 | "code": 104 6 | } 7 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-15-invitableNonGame.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "message": "(#15) This method is only accessible to Games.", 4 | "type": "OAuthException", 5 | "code": 15 6 | } 7 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-190-bogusAccessToken.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "message": "The access token could not be decrypted", 4 | "type": "OAuthException", 5 | "code": 190 6 | } 7 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-190-tokenExpired.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "message": "Error validating access token: Session has expired on Thursday, 09-Apr-15 15:00:00 PDT. The current time is Friday, 10-Apr-15 10:26:12 PDT.", 4 | "type": "OAuthException", 5 | "code": 190, 6 | "error_subcode": 463 7 | } 8 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-190-userLoggedOut.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "message": "Error validating access token: The session is invalid because the user logged out.", 4 | "type": "OAuthException", 5 | "code": 190, 6 | "error_subcode": 467 7 | } 8 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-190-userRevokedToken.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "message": "Error validating access token: The session was invalidated explicitly using an API call.", 4 | "type": "OAuthException", 5 | "code": 190, 6 | "error_subcode": 466 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-2-serviceUnavailable.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "message": "Service temporarily unavailable", 4 | "type": "FacebookApiException", 5 | "is_transient": true, 6 | "code": 2 7 | } 8 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-200-notAuthorizedForAction.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "message": "(#200) The user hasn't authorized the application to perform this action", 4 | "type": "OAuthException", 5 | "code": 200 6 | } 7 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-2500-bogusPath.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "message": "Unknown path components: /bogus", 4 | "type": "OAuthException", 5 | "code": 2500 6 | } 7 | } 8 | 9 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-368-blocked.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "message":"It looks like you were misusing this feature by going too fast. You\u2019ve been blocked from using it.\n\nLearn more about blocks in the Help Center.", 4 | "type":"OAuthException", 5 | "code":368 6 | } 7 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-506-duplicate.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "message": "Duplicate status message", 4 | "type": "FacebookApiException", 5 | "code": 506, 6 | "error_subcode": 1455006, 7 | "is_transient": false, 8 | "error_user_title": "Duplicate Status Update", 9 | "error_user_msg": "This status update is identical to the last one you posted. Try posting something different, or delete your previous update." 10 | } 11 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-803-unknownAlias.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "message": "(#803) Cannot query users by their username (sfdsafdasf)", 4 | "type": "OAuthException", 5 | "code": 803 6 | } 7 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-app-capability.json: -------------------------------------------------------------------------------- 1 | {"error":{"type":"OAuthException","message":"(#3) App must be on whitelist"}} -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-duplicate-status.json: -------------------------------------------------------------------------------- 1 | { 2 | "error": { 3 | "code": 506, 4 | "error_subcode": 1455006, 5 | "error_user_msg": "This status update is identical to the last one you posted. Try posting something different, or delete your previous update.", 6 | "error_user_title": "Duplicate Status Update", 7 | "is_transient": false, 8 | "message": "Duplicate status message", 9 | "type": "FacebookApiException" 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-duplicate-to-twitter.json: -------------------------------------------------------------------------------- 1 | {"error":{"type":"OAuthException","message":"(#100) The status you are trying to publish is a duplicate of, or too similar to, one that we recently posted to Twitter"}} 2 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-expired-token.json: -------------------------------------------------------------------------------- 1 | {"error":{"type":"OAuthException","message":"Error validating access token: Session has expired at unix time 1308178800. The current unix time is 1308181975."}} -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-insufficient-privilege.json: -------------------------------------------------------------------------------- 1 | {"error":{"type":"OAuthException","message":"(#299) Requires extended permission: rsvp_event"}} -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-invalid-fbid.json: -------------------------------------------------------------------------------- 1 | {"error":{"type":"OAuthException","message":"(#100) Invalid fbid."}} -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-invalid-token-deauth.json: -------------------------------------------------------------------------------- 1 | {"error":{"type":"OAuthException","message":"Error validating access token: 123456789 has not authorized application 987654321"}} -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-invalid-token-password.json: -------------------------------------------------------------------------------- 1 | {"error":{"type":"OAuthException","message":"Error validating access token: The session has been invalidated because the user has changed the password."}} -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-invalid-token-signout.json: -------------------------------------------------------------------------------- 1 | {"error":{"type":"OAuthException","message":"Error validating access token: The session is invalid because the user logged out."}} -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-not-a-friend.json: -------------------------------------------------------------------------------- 1 | {"error":{"type":"Exception","message":"The member must be a friend of the current user."}} -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-not-json.html: -------------------------------------------------------------------------------- 1 | 2 | 400 Bad Request 3 | 4 |

400 Bad Request

5 |
nginx
6 | 7 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-not-the-owner.json: -------------------------------------------------------------------------------- 1 | {"error":{"type":"Exception","message":"User must be an owner of the friendlist"}} -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-permission.json: -------------------------------------------------------------------------------- 1 | {"error":{"type":"OAuthException","message":"(#200) Permissions error"}} -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-rate-limit.json: -------------------------------------------------------------------------------- 1 | {"error":{"type":"OAuthException","message":"(#341) Feed action request limit reached"}} -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-url-parameter.json: -------------------------------------------------------------------------------- 1 | {"error":{"type":"OAuthException","message":"(#100) The parameter url is required"}} -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-user-hasnt-authorized.json: -------------------------------------------------------------------------------- 1 | {"error":{"message":"(#200) The user hasn't authorized the application to perform this action","type":"OAuthException","code":200}} 2 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/error-whitelist.json: -------------------------------------------------------------------------------- 1 | {"error":{"type":"OAuthException","message":"(#3) App must be on whitelist"}} -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/event-list.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "name": "FLUG (Florida Local Users Group) Spring User Conference", 5 | "start_time": "2011-06-01T08:00:00", 6 | "end_time": "2011-06-03T16:00:00", 7 | "location": "Radisson Resort at the Port", 8 | "id": "196119297091135" 9 | } 10 | ], 11 | "paging": { 12 | "previous": "https://graph.facebook.com/search?q=Spring+User+Group&type=event&limit=25&since=1306915200", 13 | "next": "https://graph.facebook.com/search?q=Spring+User+Group&type=event&limit=25&until=1306915200" 14 | } 15 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/event.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"188420717869087", 3 | "owner": 4 | { 5 | "name":"Craig Walls", 6 | "id":"738140579" 7 | }, 8 | "name":"Afternoon naptime", 9 | "description":"Sawing logs", 10 | "start_time":"2011-03-26T14:00:00", 11 | "end_time":"2011-03-26T15:00:00", 12 | "location":"On the couch", 13 | "venue": { 14 | "id": "215524685134868", 15 | "city": "Fort Worth", 16 | "country": "United States", 17 | "latitude": 32.7493792167, 18 | "longitude": -97.3371771801, 19 | "state": "TX", 20 | "street": "921 Henderson St", 21 | "zip": "76102" 22 | }, 23 | "privacy":"SECRET", 24 | "updated_time":"2011-03-24T19:40:43+0000" 25 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/family.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "name": "Homer Simpson", 5 | "id": "12345678901", 6 | "relationship": "father" 7 | }, 8 | { 9 | "name": "Marge Simpson", 10 | "id": "12345678902", 11 | "relationship": "mother" 12 | }, 13 | { 14 | "name": "Lisa Simpson", 15 | "id": "12345678903", 16 | "relationship": "sister" 17 | }, 18 | { 19 | "name": "Maggie Simpson", 20 | "id": "12345678904", 21 | "relationship": "sister" 22 | }, 23 | { 24 | "name": "Abraham Simpson", 25 | "id": "12345678905", 26 | "relationship": "grandfather" 27 | } 28 | ], 29 | "paging": { 30 | "next": "https://graph.facebook.com/12345678900/family?format=json&limit=5000&offset=5000&__after_id=12345678905" 31 | } 32 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/feed-with-unknown-type.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": 3 | [ 4 | { 5 | "id":"100001387295207_160065090716400", 6 | "from": 7 | { 8 | "name":"Art Names", 9 | "id":"100001387295207" 10 | }, 11 | "message":"Just trying something", 12 | "type":"bogus", 13 | "created_time":"2011-03-23T15:40:17+0000", 14 | "updated_time":"2011-03-23T15:40:17+0000" 15 | } 16 | ], 17 | "paging": 18 | { 19 | "previous":"https:\/\/graph.facebook.com\/me\/feed?limit=25&since=1300894817", 20 | "next":"https:\/\/graph.facebook.com\/me\/feed?limit=25&until=1294351475" 21 | } 22 | } 23 | 24 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/fql-result-basic-with-float.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "vid": "10151147608775580", 5 | "title": "Video 1", 6 | "length": 20.62 7 | }, 8 | { 9 | "vid": "10150902511815580", 10 | "title": "Video 2", 11 | "length": 128.16 12 | }, 13 | { 14 | "vid": "10150447297960580", 15 | "title": "Video 3", 16 | "length": 31 17 | } 18 | ] 19 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/fql-result-basic.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "uid": 1234567890, 5 | "status_id": "10151137016185580", 6 | "message": "Test Message 1", 7 | "time": 1326503998, 8 | "source": 6628568379 9 | }, 10 | { 11 | "uid": 1234567890, 12 | "status_id": "10150997723860580", 13 | "message": "Test Message 2", 14 | "time": 1323184190, 15 | "source": 0 16 | }, 17 | { 18 | "uid": 1234567890, 19 | "status_id": "10150958796185580", 20 | "message": "Test Message 3", 21 | "time": null, 22 | "source": 6628568379 23 | } 24 | ] 25 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/fql-result-list-of-objects.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "uid": 12345678900, 5 | "name": "Bart Simpson", 6 | "family": [ 7 | { 8 | "relationship": "father", 9 | "uid": 12345678901 10 | }, 11 | { 12 | "relationship": "mother", 13 | "uid": 12345678902 14 | }, 15 | { 16 | "relationship": "sister", 17 | "uid": 12345678903 18 | }, 19 | { 20 | "relationship": "sister", 21 | "uid": 12345678904 22 | } 23 | ] 24 | } 25 | ] 26 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/fql-result-with-object-field.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "app_id": "162886103757745", 5 | "display_name": "Spring Social Showcase", 6 | "restriction_info": { 7 | "type": "alcohol", 8 | "location" : "US", 9 | "age" : "18", 10 | "age_distribution" : "18+" 11 | } 12 | } 13 | ] 14 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/fql-with-nulls.json: -------------------------------------------------------------------------------- 1 | { 2 | "data":[ 3 | { 4 | "string":"Test", 5 | "string_null":null, 6 | "number":12345, 7 | "numer_null":null, 8 | "float":12345.67, 9 | "float_null":null, 10 | "boolean":true, 11 | "boolean_null":null, 12 | "time": 1323184190, 13 | "time_null":null, 14 | "list": [ 15 | { 16 | "fieldA":"someValue", 17 | "fieldB":12345678901 18 | }, 19 | { 20 | "fieldA":"someOtherValue", 21 | "fieldB":12345678902 22 | } 23 | ], 24 | "list_empty":[], 25 | "list_null":null, 26 | "object":{ 27 | "fieldA":"someValue", 28 | "fieldB":1234567901 29 | }, 30 | "object_null":null 31 | } 32 | ] 33 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/friend-ids.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "id": "7918522" 5 | }, 6 | { 7 | "id": "149000307" 8 | }, 9 | { 10 | "id": "151101314" 11 | } 12 | ], 13 | "paging": { 14 | "next": "https://graph.facebook.com/v2.3/1255689239/friends?limit=25&offset=25&__after_id=enc_AdCT6WOXITvyG4Eyez7xvw0SjoDHMKspZBotK4rlsiZCmufw419aT8Ff4lWofDrfqHsPkZD" 15 | }, 16 | "summary": { 17 | "total_count": 477 18 | } 19 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/friend-list.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"11929590579", 3 | "name":"High School Friends" 4 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/friend-lists.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": 3 | [ 4 | { 5 | "id":"11929590579", 6 | "name":"High School Friends" 7 | }, 8 | { 9 | "id":"7770595579", 10 | "name":"Family" 11 | }, 12 | { 13 | "id":"7716889379", 14 | "name":"College Friends" 15 | } 16 | ] 17 | } 18 | 19 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/friends.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "name": "Roy Clarkson", 5 | "id": "12345" 6 | }, 7 | { 8 | "name": "Keith Donald", 9 | "id": "67890" 10 | }, 11 | { 12 | "name": "Rod Johnson", 13 | "id": "24680" 14 | } 15 | ], 16 | "paging": { 17 | "next": "https://graph.facebook.com/v2.3/1255689239/friends?limit=25&offset=25&__after_id=enc_AdCT6WOXITvyG4Eyez7xvw0SjoDHMKspZBotK4rlsiZCmufw419aT8Ff4lWofDrfqHsPkZD" 18 | }, 19 | "summary": { 20 | "total_count": 477 21 | } 22 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/friends_tagged_at.json: -------------------------------------------------------------------------------- 1 | { 2 | "context": { 3 | "friends_tagged_at": { 4 | "data": [ 5 | { 6 | "id": "726452090", 7 | "name": "Guillaume Laforge" 8 | }, 9 | { 10 | "id": "1255689239", 11 | "name": "Keith Donald" 12 | } 13 | ], 14 | "paging": { 15 | "cursors": { 16 | "before": "NjA0NDMzODY4", 17 | "after": "MTU3NjQzMDIxNQ==" 18 | } 19 | }, 20 | "summary": { 21 | "total_count": 7 22 | } 23 | } 24 | }, 25 | "id": "145634995501895" 26 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/friends_using_app.json: -------------------------------------------------------------------------------- 1 | { 2 | "context": { 3 | "friends_using_app": { 4 | "data": [ 5 | { 6 | "id": "726452090", 7 | "name": "Guillaume Laforge" 8 | }, 9 | { 10 | "id": "1255689239", 11 | "name": "Keith Donald" 12 | } 13 | ], 14 | "paging": { 15 | "cursors": { 16 | "before": "NjA0NDMzODY4", 17 | "after": "MTU3NjQzMDIxNQ==" 18 | } 19 | }, 20 | "summary": { 21 | "total_count": 7 22 | } 23 | } 24 | }, 25 | "id": "145634995501895" 26 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/friends_who_like.json: -------------------------------------------------------------------------------- 1 | { 2 | "context": { 3 | "friends_who_like": { 4 | "data": [ 5 | { 6 | "id": "726452090", 7 | "name": "Guillaume Laforge" 8 | }, 9 | { 10 | "id": "1255689239", 11 | "name": "Keith Donald" 12 | } 13 | ], 14 | "paging": { 15 | "cursors": { 16 | "before": "NjA0NDMzODY4", 17 | "after": "MTU3NjQzMDIxNQ==" 18 | } 19 | }, 20 | "summary": { 21 | "total_count": 7 22 | } 23 | } 24 | }, 25 | "id": "145634995501895" 26 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/full-event.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"193482154020832", 3 | "owner": 4 | { 5 | "name":"Art Names", 6 | "id":"100001387295207" 7 | }, 8 | "name":"Breakdancing Class", 9 | "description":"Bring your best parachute pants!", 10 | "start_time":"2011-03-30T14:30:00", 11 | "end_time":"2011-03-30T17:30:00", 12 | "location":"2400 Dunlavy Dr, Denton, TX", 13 | "privacy":"SECRET", 14 | "updated_time":"2011-03-30T14:38:40+0000" 15 | } 16 | 17 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/games.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "name": "Super Mario Stadium Baseball", 5 | "category": "Games/toys", 6 | "id": "113744711969537", 7 | "created_time": "2011-11-16T22:55:39+0000" 8 | }, 9 | { 10 | "name": "Disney Epic Mickey Video Game", 11 | "category": "Games/toys", 12 | "id": "128165803879512", 13 | "created_time": "2012-02-02T11:23:19+0000" 14 | } 15 | ], 16 | "paging": { 17 | "next": "https://graph.facebook.com/12345678/games?access_token=some-access-token&limit=5000&offset=5000&__after_id=113744711969537" 18 | } 19 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/group-members.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": 3 | [ 4 | { 5 | "name":"Art Names", 6 | "id":"100001387295207" 7 | }, 8 | { 9 | "name":"Craig Walls", 10 | "id":"738140579", 11 | "administrator":true 12 | }, 13 | { 14 | "name":"Chuck Wagon", 15 | "id":"627039468", 16 | "administrator":true 17 | } 18 | ] 19 | } 20 | 21 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/group-memberships.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "name": "Test Group", 5 | "id": "12345", 6 | "bookmark_order": 1, 7 | "administrator": true 8 | }, 9 | { 10 | "name": "Test Group 2", 11 | "bookmark_order": 2, 12 | "id": "54321" 13 | }, 14 | { 15 | "name": "Test Group 3", 16 | "bookmark_order": 999999999, 17 | "id": "24680", 18 | "unread": 24 19 | } 20 | ], 21 | "paging": { 22 | "next": "https://graph.facebook.com/738140579/groups?format=json&limit=5000&offset=5000&__after_id=32891918542" 23 | } 24 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/group.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"213106022036379", 3 | "version":1, 4 | "owner": 5 | { 6 | "name":"Craig Walls", 7 | "id":"738140579" 8 | }, 9 | "name":"Test Group", 10 | "description":"Just a test group", 11 | "privacy":"SECRET", 12 | "icon":"https:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/yN\/r\/IPw3LB5BsPK.png", 13 | "updated_time":"2011-03-30T19:24:59+0000", 14 | "email":"213106022036379\u0040groups.facebook.com" 15 | } 16 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/id-only.json: -------------------------------------------------------------------------------- 1 | {"id":"297875170268724"} -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/ids_for_business.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "id" : "123456", 5 | "app" : { 6 | "id" : "APP1", 7 | "name" : "App one" 8 | } 9 | }, 10 | { 11 | "id" : "987654", 12 | "app" : { 13 | "id" : "APP2", 14 | "name" : "App two" 15 | } 16 | } 17 | ], 18 | "paging": { 19 | "previous": "https://graph.facebook.com/me/ids_for_business?limit=25&since=1306915200", 20 | "next": "https://graph.facebook.com/me/ids_for_business?limit=25&until=1306915200" 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/interests.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": 3 | [ 4 | { 5 | "name":"Insects", 6 | "category":"Animal", 7 | "id":"115137931834647", 8 | "created_time":"2011-03-24T17:40:43+0000" 9 | }, 10 | { 11 | "name":"Renaissance Festivals", 12 | "category":"Interest", 13 | "id":"375108804933", 14 | "created_time":"2011-03-24T17:40:41+0000" 15 | } 16 | ] 17 | } 18 | 19 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/invitable_friends.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "id": "abcdef", 5 | "name": "Billy Williams", 6 | "first_name": "Billy", 7 | "last_name": "Williams" 8 | }, 9 | { 10 | "id": "ghijkl", 11 | "name": "Kristopher Walls", 12 | "first_name": "Kristopher", 13 | "last_name": "Walls", 14 | "middle_name": "Len" 15 | } 16 | ], 17 | "paging": { 18 | "cursors": { 19 | "after": "QWFJRGdUVG9GMVN4VzU5dGVYQjBfOWZTSk5zMmlBWlZrZlczbFk3ZE1UNF9LXzQtQzNSYVIxQzdHNnl3WEZXRmdvaXVhQVJkM1oyV0NtT09VejJDOWczNzZoVWJPcXRwYmF4djBzQVFqam1rbmc=", 20 | "before": "QWFJNkNjcUE5VXFGVWo4cGRZSTRRSklnSTZYOHNYNzlZZGdSeEpqT0FadG9GMmx3b0JnWU9FRzhla3NSWVpNMEp0c3BrVXJDYVYzLVVDNTNpM0MwZlBlekYwazV5RGN1ZXRMLXhiOFJGcmxjdHc=" 21 | }, 22 | "next": "https://graph.facebook.com/v2.3/738140579/taggable_friends?pretty=0&limit=25&after=QWFJRGdUVG9GMVN4VzU5dGVYQjBfOWZTSk5zMmlBWlZrZlczbFk3ZE1UNF9LXzQtQzNSYVIxQzdHNnl3WEZXRmdvaXVhQVJkM1oyV0NtT09VejJDOWczNzZoVWJPcXRwYmF4djBzQVFqam1rbmc=" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/invited.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": 3 | [ 4 | { 5 | "name":"Art Names", 6 | "id":"100001387295207", 7 | "rsvp_status":"attending" 8 | }, 9 | { 10 | "name":"Craig Walls", 11 | "id":"738140579", 12 | "rsvp_status":"unsure" 13 | }, 14 | { 15 | "name":"Chuck Wagon", 16 | "id":"975041837", 17 | "rsvp_status":"not_replied" 18 | } 19 | ] 20 | } 21 | 22 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/likes.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": 3 | [ 4 | { 5 | "name":"Jack Bauer", 6 | "id":"1122334455" 7 | }, 8 | { 9 | "name":"Chuck Norris", 10 | "id":"5544332211" 11 | }, 12 | { 13 | "name":"Edmund Blackadder", 14 | "id":"1324354657" 15 | } 16 | ] 17 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/maybe-attending.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": 3 | [ 4 | { 5 | "name":"Art Names", 6 | "id":"100001387295207", 7 | "rsvp_status":"unsure" 8 | }, 9 | { 10 | "name":"Craig Walls", 11 | "id":"738140579", 12 | "rsvp_status":"unsure" 13 | }, 14 | { 15 | "name":"Chuck Wagon", 16 | "id":"975041837", 17 | "rsvp_status":"unsure" 18 | } 19 | ] 20 | } 21 | 22 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/minimal-profile-no-middle-name.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "123456789", 3 | "name": "Michael Craig Walls", 4 | "first_name": "Michael", 5 | "last_name": "Walls", 6 | "username": "habuma", 7 | "gender": "male", 8 | "locale": "en_US" 9 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/minimal-profile-with-age-range-13-17.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "123456789", 3 | "name": "Michael Craig Walls", 4 | "first_name": "Michael", 5 | "middle_name": "Craig", 6 | "last_name": "Walls", 7 | "username": "habuma", 8 | "gender": "male", 9 | "locale": "en_US", 10 | "age_range": { 11 | "min": 13, 12 | "max": 17 13 | } 14 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/minimal-profile-with-age-range-18-20.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "123456789", 3 | "name": "Michael Craig Walls", 4 | "first_name": "Michael", 5 | "middle_name": "Craig", 6 | "last_name": "Walls", 7 | "username": "habuma", 8 | "gender": "male", 9 | "locale": "en_US", 10 | "age_range": { 11 | "min": 18, 12 | "max": 20 13 | } 14 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/minimal-profile-with-age-range-21-plus.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "123456789", 3 | "name": "Michael Craig Walls", 4 | "first_name": "Michael", 5 | "middle_name": "Craig", 6 | "last_name": "Walls", 7 | "username": "habuma", 8 | "gender": "male", 9 | "locale": "en_US", 10 | "age_range": { 11 | "min": 21 12 | } 13 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/minimal-profile-with-age-range-unknown.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "123456789", 3 | "name": "Michael Craig Walls", 4 | "first_name": "Michael", 5 | "middle_name": "Craig", 6 | "last_name": "Walls", 7 | "username": "habuma", 8 | "gender": "male", 9 | "locale": "en_US", 10 | "age_range": { 11 | "min": 33, 12 | "max": 42 13 | } 14 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/minimal-profile-with-timezone.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "123456789", 3 | "name": "Michael Craig Walls", 4 | "first_name": "Michael", 5 | "middle_name": "Craig", 6 | "last_name": "Walls", 7 | "username": "habuma", 8 | "gender": "male", 9 | "locale": "en_US", 10 | "timezone": "-4.5" 11 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/minimal-profile.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "123456789", 3 | "name": "Michael Craig Walls", 4 | "first_name": "Michael", 5 | "middle_name": "Craig", 6 | "last_name": "Walls", 7 | "username": "habuma", 8 | "gender": "male", 9 | "locale": "en_US" 10 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/music_listen_friends.json: -------------------------------------------------------------------------------- 1 | { 2 | "context": { 3 | "music_listen_friends": { 4 | "data": [ 5 | { 6 | "id": "726452090", 7 | "name": "Guillaume Laforge" 8 | }, 9 | { 10 | "id": "1255689239", 11 | "name": "Keith Donald" 12 | } 13 | ], 14 | "paging": { 15 | "cursors": { 16 | "before": "NjA0NDMzODY4", 17 | "after": "MTU3NjQzMDIxNQ==" 18 | } 19 | }, 20 | "summary": { 21 | "total_count": 7 22 | } 23 | } 24 | }, 25 | "id": "145634995501895" 26 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/mutual_friends.json: -------------------------------------------------------------------------------- 1 | { 2 | "context": { 3 | "mutual_friends": { 4 | "data": [ 5 | { 6 | "id": "708598160", 7 | "name": "Josh Long" 8 | }, 9 | { 10 | "id": "1255689239", 11 | "name": "Keith Donald" 12 | } 13 | ], 14 | "paging": { 15 | "cursors": { 16 | "before": "NzA4NTk4MTYw", 17 | "after": "MTI1NTY4OTIzOQ==" 18 | } 19 | }, 20 | "summary": { 21 | "total_count": 177 22 | } 23 | } 24 | }, 25 | "id": "738140579" 26 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/mutual_likes.json: -------------------------------------------------------------------------------- 1 | { 2 | "context": { 3 | "mutual_likes": { 4 | "data": [ 5 | { 6 | "category": "Musician/band", 7 | "name": "Mulch, Sweat, & Shears", 8 | "id": "36643253738" 9 | }, 10 | { 11 | "category": "Food/beverages", 12 | "name": "Torchy's Tacos", 13 | "id": "188620089283" 14 | } 15 | ], 16 | "paging": { 17 | "cursors": { 18 | "before": "NzA2MjE2MjQyNzI4NjY5", 19 | "after": "MTAzMTA2NDI5NzMwMjQ5" 20 | }, 21 | "next": "https://graph.facebook.com/v2.3/738140579?pretty=0&fields=context.fields(mutual_likes.limit(25).after(MTAzMTA2NDI5NzMwMjQ5))" 22 | }, 23 | "summary": { 24 | "total_count": 68 25 | } 26 | } 27 | }, 28 | "id": "738140579" 29 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/no-replies.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": 3 | [ 4 | { 5 | "name":"Art Names", 6 | "id":"100001387295207", 7 | "rsvp_status":"not_replied" 8 | }, 9 | { 10 | "name":"Craig Walls", 11 | "id":"738140579", 12 | "rsvp_status":"not_replied" 13 | }, 14 | { 15 | "name":"Chuck Wagon", 16 | "id":"975041837", 17 | "rsvp_status":"not_replied" 18 | } 19 | ] 20 | } 21 | 22 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/organization-page.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "140804655931206", 3 | "can_post": false, 4 | "name": "SpringSource", 5 | "picture": "https://profile.ak.fbcdn.net/static-ak/rsrc.php/v1/yr/r/fwJFrO5KjAQ.png", 6 | "link": "https://www.facebook.com/pages/SpringSource/140804655931206", 7 | "category": "Organization", 8 | "likes": 33, 9 | "is_community_page": true, 10 | "description": "\u003cp>\u003cb>SpringSource\u003c/b> is a division of \u003ca href=\"https://en.wikipedia.org/wiki/VMware\" class=\"wikipedia\">VMware\u003c/a> that provides...\u003c/p>", 11 | "about": "SpringSource offers a product suite to build, run & manage enterprise Java applications. Please join the SpringSource Group here: https://www.facebook.com/groups/10463298884/", 12 | "is_community_page": false, 13 | "is_published": true, 14 | "has_added_app": false, 15 | "talking_about_count": 19 16 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/place-page.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "150263434985489", 3 | "can_post": false, 4 | "name": "Denver International Airport", 5 | "picture": "https://profile.ak.fbcdn.net/static-ak/rsrc.php/v1/yZ/r/u3l2nEuXNsK.png", 6 | "link": "https://www.facebook.com/pages/Denver-International-Airport/150263434985489", 7 | "category": "Local business", 8 | "likes": 1052, 9 | "website": "https://flydenver.com", 10 | "is_community_page": false, 11 | "is_published": false, 12 | "has_added_app": false, 13 | "location": { 14 | "city": "Denver", 15 | "state": "CO", 16 | "country": "United States", 17 | "latitude": 39.851693483111, 18 | "longitude": -104.67384947947 19 | }, 20 | "restaurant_services": { 21 | "delivery": 0, 22 | "catering": 1, 23 | "groups": 1, 24 | "kids": 1, 25 | "outdoor": 0, 26 | "reserve": 0, 27 | "takeout": 1, 28 | "waiter": 1, 29 | "walkins": 1 30 | }, 31 | "restaurant_specialties": { 32 | "breakfast": 0, 33 | "coffee": 0, 34 | "dinner": 1, 35 | "drinks": 1, 36 | "lunch": 1 37 | }, 38 | "parking": { 39 | "lot": 1, 40 | "street": 0, 41 | "valet": 0 42 | }, 43 | "phone": "(303) 342-2000", 44 | "checkins": 121661, 45 | "talking_about_count": 15062 46 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/places-list.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "name": "True Brew Coffee & Espresso Service", 5 | "category": "Local business", 6 | "location": { 7 | "street": "542 Haggard St", 8 | "city": "Plano", 9 | "state": "TX", 10 | "country": "United States", 11 | "zip": "75074-5529", 12 | "latitude": 33.026239, 13 | "longitude": -96.707089 14 | }, 15 | "id": "117723491586638" 16 | }, 17 | { 18 | "name": "Starbucks Coffee", 19 | "category": "Local business", 20 | "location": { 21 | "city": "Plano", 22 | "state": "TX", 23 | "country": "United States", 24 | "latitude": 33.027734, 25 | "longitude": -96.795133 26 | }, 27 | "id": "169020919798274" 28 | } 29 | ] 30 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/post_nolikes.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"100001387295207_123939024341978", 3 | "from": 4 | { 5 | "name":"Art Names", 6 | "id":"100001387295207" 7 | }, 8 | "message":"Hello world!", 9 | "type":"status", 10 | "application": 11 | { 12 | "name":"Spring Social Showcase", 13 | "id":"162886103757745" 14 | }, 15 | "created_time":"2011-01-18T22:21:00+0000", 16 | "updated_time":"2011-01-18T22:21:00+0000", 17 | "comments": 18 | { 19 | "data": 20 | [ 21 | { 22 | "id":"1533260333_122829644452184_587062", 23 | "from": 24 | { 25 | "name":"Art Names", 26 | "id":"1533260333" 27 | }, 28 | "message":"Howdy!", 29 | "can_remove": false, 30 | "created_time":"2011-01-17T16:02:09+0000", 31 | "like_count": 0, 32 | "user_likes": true 33 | }, 34 | { 35 | "id":"638140578_122829644452184_591322", 36 | "from": 37 | { 38 | "name":"Chuck Wagon", 39 | "id":"638140578" 40 | }, 41 | "message":"The world says hello back", 42 | "can_remove": false, 43 | "created_time":"2011-01-18T05:01:07+0000", 44 | "like_count": 3, 45 | "user_likes": true 46 | 47 | } 48 | ], 49 | "count":22 50 | } 51 | } 52 | 53 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/product-page.json: -------------------------------------------------------------------------------- 1 | { 2 | "id": "21278871488", 3 | "can_post": true, 4 | "cover": { 5 | "cover_id": "10151582481816489", 6 | "source": "https://sphotos-g.ak.fbcdn.net/hphotos-ak-ash3/s720x720/942964_10151582481816489_61037109_n.jpg", 7 | "offset_y": 10, 8 | "offset_x": 20 9 | }, 10 | "name": "Mountain Dew", 11 | "picture": "https://profile.ak.fbcdn.net/hprofile-ak-snc4/203494_21278871488_3106566_s.jpg", 12 | "link": "https://www.facebook.com/mountaindew", 13 | "category": "Food/beverages", 14 | "likes": 5083988, 15 | "website": "www.mountaindew.com\nwww.greenlabelsound.com\nwww.greenlabelart.com\nwww.honorthecode.com\nwww.dietdewchallenge.com\nwww.twitter.com/mtn_dew\nwww.youtube.com/mountaindew", 16 | "username": "mountaindew", 17 | "mission": "Join The Official Mountain Dew Facebook page for a \u201cpeek under the cap\u201d at the latest and greatest from DEW.\n", 18 | "products": "Mountain Dew, Diet Mountain Dew, Mountain Dew Voltage, Mountain Dew White Out, Mountain Dew Code Red, Diet Mountain Dew Code Red, Mountain Dew LiveWire, BajaBlast", 19 | "about": "This is How We DEW", 20 | "is_community_page": true, 21 | "is_published": true, 22 | "has_added_app": true, 23 | "talking_about_count": 32597 24 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/question-option.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"338689702832185", 3 | "from":{ 4 | "name":"Art Names", 5 | "id":"100001387295207" 6 | }, 7 | "name":"Dallas Cowboys", 8 | "votes":1023, 9 | "created_time":"2012-02-03T18:44:51+0000" 10 | } 11 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/question-options.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [{ 3 | "id": "338689702832185", 4 | "from": { 5 | "name": "Art Names", 6 | "id": "100001387295207" 7 | }, 8 | "name": "Dallas Cowboys", 9 | "votes": 1023, 10 | "created_time": "2012-02-03T18:44:51+0000" 11 | }, 12 | { 13 | "id": "367412276605710", 14 | "from": { 15 | "name": "Art Names", 16 | "id": "100001387295207" 17 | }, 18 | "name": "New York Giants", 19 | "votes": 981, 20 | "created_time": "2012-02-03T18:46:43+0000" 21 | }], 22 | "paging": { 23 | "next": "https:\/\/graph.facebook.com\/297875170268724\/options?limit=25&offset=25&__after_id=367412276605710" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/question-with-options.json: -------------------------------------------------------------------------------- 1 | { 2 | "created_time": "2012-02-03T17:40:36+0000", 3 | "from": 4 | { 5 | "id": 6 | "100001387295207", 7 | "name": 8 | "Art Names" 9 | }, 10 | "id": "297875170268724", 11 | "options": 12 | { 13 | "data": 14 | [ 15 | { 16 | "created_time": "2012-02-03T18:44:51+0000", 17 | "from": 18 | { 19 | "id": "100001387295207", 20 | "name": "Art Names" 21 | }, 22 | "id": "338689702832185", 23 | "name": "Dallas Cowboys", 24 | "votes": 1023 25 | }, 26 | { 27 | "created_time": "2012-02-03T18:46:43+0000", 28 | "from": 29 | { 30 | "id": "100001387295207", 31 | "name": "Art Names" 32 | }, 33 | "id": "367412276605710", 34 | "name": "New York Giants", 35 | "votes": 981 36 | } 37 | ], 38 | "paging": 39 | { 40 | "next": "https://graph.facebook.com/297875170268724/options?access_token=AAACUJOBac7EBANG7MXChVUv556pOtsdAdnd9ZAF2IZCZABazrSDHriZBvRqvGP76xHwNKXf8Dp5u1FBCUCAHs29YBvbXXkCkOWMCmrL0BAZDZD&limit=25&offset=25&__after_id=367412276605710" 41 | } 42 | }, 43 | "question": "What's your favorite football team?", 44 | "updated_time": "2012-02-03T17:40:36+0000" 45 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/question-without-options.json: -------------------------------------------------------------------------------- 1 | { 2 | "created_time": "2012-02-03T17:40:36+0000", 3 | "from": 4 | { 5 | "id": "100001387295207", 6 | "name": "Art Names" 7 | }, 8 | "id": "297875170268724", 9 | "question": "What's your favorite football team?", 10 | "updated_time": "2012-02-03T17:40:36+0000" 11 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/simple-event-friend-privacy.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"193482154020832", 3 | "cover": { 4 | "cover_id": "14639096", 5 | "offset_x": 0, 6 | "offset_y": 50, 7 | "source": "https://fbcdn-sphotos-g-a.akamaihd.net/hphotos-ak-xpf1/t1.0-9/s720x720/10322540_1463971520512096_8756935_n.jpg" 8 | }, 9 | "owner": 10 | { 11 | "name":"Art Names", 12 | "id":"100001387295207" 13 | }, 14 | "name":"Breakdancing Class", 15 | "start_time":"2011-03-30T14:30:00", 16 | "end_time":"2011-03-30T17:30:00", 17 | "privacy":"FRIENDS", 18 | "updated_time":"2011-03-30T14:30:28+0000", 19 | "description": "Some call it spin class", 20 | "place": { 21 | "id": "142223762504319", 22 | "location": { 23 | "city": "Lake Buena Vista", 24 | "country": "United States", 25 | "latitude": 28.350102, 26 | "longitude": -81.548863, 27 | "state": "FL", 28 | "street": "1850 Animation Way", 29 | "zip": "32830" 30 | }, 31 | "name": "Disney's Art of Animation Resort" 32 | }, 33 | "is_date_only": true 34 | } 35 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/simple-event.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"193482154020832", 3 | "cover": { 4 | "cover_id": "14639096", 5 | "offset_x": 0, 6 | "offset_y": 50, 7 | "source": "https://fbcdn-sphotos-g-a.akamaihd.net/hphotos-ak-xpf1/t1.0-9/s720x720/10322540_1463971520512096_8756935_n.jpg" 8 | }, 9 | "owner": 10 | { 11 | "name":"Art Names", 12 | "id":"100001387295207" 13 | }, 14 | "name":"Breakdancing Class", 15 | "start_time":"2011-03-30T14:30:00", 16 | "end_time":"2011-03-30T17:30:00", 17 | "privacy":"OPEN", 18 | "updated_time":"2011-03-30T14:30:28+0000", 19 | "description": "Some call it spin class", 20 | "place": { 21 | "id": "142223762504319", 22 | "location": { 23 | "city": "Lake Buena Vista", 24 | "country": "United States", 25 | "latitude": 28.350102, 26 | "longitude": -81.548863, 27 | "state": "FL", 28 | "street": "1850 Animation Way", 29 | "zip": "32830" 30 | }, 31 | "name": "Disney's Art of Animation Resort" 32 | }, 33 | "is_date_only": true 34 | } 35 | 36 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/subscribe-list.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "name": "Mark Zuckerberg", 5 | "id": "4" 6 | }, 7 | { 8 | "name": "Rod Johnson", 9 | "id": "1075423140" 10 | } 11 | ], 12 | "paging": { 13 | "next": "https://graph.facebook.com/me/subscribedTo?format=json&limit=5000&offset=5000&__after_id=1075423140" 14 | } 15 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/taggable_friends.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "id": "abcdef", 5 | "name": "Billy Williams", 6 | "picture": { 7 | "data": { 8 | "is_silhouette": false, 9 | "url": "https://picurl1", 10 | "width": 1024, 11 | "height": 768 12 | } 13 | }, 14 | "first_name": "Billy", 15 | "last_name": "Williams" 16 | }, 17 | { 18 | "id": "ghijkl", 19 | "name": "Kristopher Walls", 20 | "picture": { 21 | "data": { 22 | "is_silhouette": false, 23 | "url": "https://picurl2" 24 | } 25 | }, 26 | "first_name": "Kristopher", 27 | "last_name": "Walls", 28 | "middle_name": "Len" 29 | } 30 | ], 31 | "paging": { 32 | "cursors": { 33 | "after": "QWFJRGdUVG9GMVN4VzU5dGVYQjBfOWZTSk5zMmlBWlZrZlczbFk3ZE1UNF9LXzQtQzNSYVIxQzdHNnl3WEZXRmdvaXVhQVJkM1oyV0NtT09VejJDOWczNzZoVWJPcXRwYmF4djBzQVFqam1rbmc=", 34 | "before": "QWFJNkNjcUE5VXFGVWo4cGRZSTRRSklnSTZYOHNYNzlZZGdSeEpqT0FadG9GMmx3b0JnWU9FRzhla3NSWVpNMEp0c3BrVXJDYVYzLVVDNTNpM0MwZlBlekYwazV5RGN1ZXRMLXhiOFJGcmxjdHc=" 35 | }, 36 | "next": "https://graph.facebook.com/v2.3/738140579/taggable_friends?pretty=0&limit=25&after=QWFJRGdUVG9GMVN4VzU5dGVYQjBfOWZTSk5zMmlBWlZrZlczbFk3ZE1UNF9LXzQtQzNSYVIxQzdHNnl3WEZXRmdvaXVhQVJkM1oyV0NtT09VejJDOWczNzZoVWJPcXRwYmF4djBzQVFqam1rbmc=" 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/tagged_places.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "id": "10155117367290580", 5 | "created_time": "2015-02-04T14:28:51+0000", 6 | "place": { 7 | "id": "158232190858368", 8 | "location": { 9 | "city": "Lake Buena Vista", 10 | "country": "United States", 11 | "latitude": 28.415153357468, 12 | "longitude": -81.580595083499, 13 | "state": "FL", 14 | "zip": "32830" 15 | }, 16 | "name": "Disney's Magic Kingdom" 17 | } 18 | }, 19 | { 20 | "id": "10154984104080580", 21 | "created_time": "2015-01-03T15:47:59+0000", 22 | "place": { 23 | "id": "142223762504319", 24 | "location": { 25 | "city": "Lake Buena Vista", 26 | "country": "United States", 27 | "latitude": 28.350102, 28 | "longitude": -81.548863, 29 | "state": "FL", 30 | "street": "1850 Animation Way", 31 | "zip": "32830" 32 | }, 33 | "name": "Disney's Art of Animation Resort" 34 | } 35 | } 36 | ], 37 | "paging": { 38 | "cursors": { 39 | "before": "MTAxNTUxMTczNjcyOTA1ODA=", 40 | "after": "MTAxNTM5OTQxOTMxODU1ODA=" 41 | }, 42 | "next": "https://graph.facebook.com/v2.3/738140579/tagged_places?pretty=0&limit=25&after=MTAxNTM5OTQxOTMxODU1ODA=" 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/tinyrod.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/spring-social-facebook/57aadf32f68aa30eadd792c97386f2328ede3edd/spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/tinyrod.jpg -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/user-events.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": 3 | [ 4 | { 5 | "name":"Afternoon naptime", 6 | "start_time":"2011-03-26T14:00:00", 7 | "end_time":"2011-03-26T15:00:00", 8 | "location":"On the couch", 9 | "id":"188420717869087", 10 | "rsvp_status":"attending" 11 | }, 12 | { 13 | "name":"Mow the lawn", 14 | "start_time":"2011-03-26T15:00:00", 15 | "end_time":"2011-03-26T16:00:00", 16 | "id":"188420717869780", 17 | "rsvp_status":"not_replied" 18 | } 19 | ], 20 | "paging": 21 | { 22 | "previous":"https:\/\/graph.facebook.com\/habuma\/events?limit=25&since=1301148000", 23 | "next":"https:\/\/graph.facebook.com\/habuma\/events?limit=25&until=1301148000" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/user-likes.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": 3 | [ 4 | { 5 | "name":"U2", 6 | "id":"5678046685", 7 | "category":"Musician/band", 8 | "created_time":"2012-08-22T21:48:41+0000", 9 | "picture":"https://fbcdn-profile-a.akamaihd.net/hprofile-ak-snc4/277150_5678046685_1509018948_q.jpg" 10 | }, 11 | { 12 | "name":"Pirates of the Caribbean", 13 | "id":"113294925350820", 14 | "category":"Movie", 15 | "created_time":"2010-05-18T21:21:33+0000", 16 | "picture":"https://fbexternal-a.akamaihd.net/safe_image.php?d=AQCawivbIbiha8dS&w=50&h=50&url=http\u00253A\u00252F\u00252Fupload.wikimedia.org\u00252Fwikipedia\u00252Fen\u00252F6\u00252F68\u00252FPiratesDVDs.jpg&crop&fallback=hub_movie&prefix=q" 17 | }, 18 | { 19 | "name":"Freebirds World Burrito", 20 | "id":"10264922373", 21 | "category":"Food/beverages", 22 | "created_time":"2010-02-02T20:32:33+0000", 23 | "picture":"https://fbcdn-profile-a.akamaihd.net/hprofile-ak-ash2/50427_10264922373_2128398611_q.jpg" 24 | } 25 | ] 26 | } 27 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/user-notes.json: -------------------------------------------------------------------------------- 1 | 2 | { 3 | "data": 4 | [ 5 | { 6 | "id":"161200187269557", 7 | "from": 8 | { 9 | "name":"Art Names", 10 | "id":"100001387295207" 11 | }, 12 | "subject":"Just a note", 13 | "message":"\u003cp>This is just a test note. Nothing special to see here.\u003c\/p>", 14 | "icon":"https:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/yY\/r\/1gBp2bDGEuh.gif", 15 | "created_time":"2011-03-28T15:17:41+0000", 16 | "updated_time":"2011-03-28T15:17:41+0000" 17 | }, 18 | { 19 | "id":"160546394001603", 20 | "from": 21 | { 22 | "name":"Art Names", 23 | "id":"100001387295207" 24 | }, 25 | "subject":"Test Note", 26 | "message":"\u003cp>Just a \u003cstrong>test\u003c\/strong> note...nothing to see here.\u003c\/p>", 27 | "icon":"https:\/\/static.ak.fbcdn.net\/rsrc.php\/v1\/yY\/r\/1gBp2bDGEuh.gif", 28 | "created_time":"2011-03-25T18:25:01+0000", 29 | "updated_time":"2011-03-25T20:08:27+0000" 30 | } 31 | ], 32 | "paging": 33 | { 34 | "previous":"https:\/\/graph.facebook.com\/me\/notes?limit=25&since=1301325461", 35 | "next":"https:\/\/graph.facebook.com\/me\/notes?limit=25&until=1300894966" 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/user-permissions.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "permission": "user_photos", 5 | "status": "granted" 6 | }, 7 | { 8 | "permission": "user_location", 9 | "status": "declined" 10 | }, 11 | { 12 | "permission": "read_stream", 13 | "status": "granted" 14 | }, 15 | { 16 | "permission": "publish_stream", 17 | "status": "declined" 18 | } 19 | ] 20 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/user-references.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": [ 3 | { 4 | "name": "Michael Scott", 5 | "id": "100000737708615" 6 | }, 7 | { 8 | "name": "Michael Scott", 9 | "id": "100000354483321" 10 | }, 11 | { 12 | "name": "Michael Scott", 13 | "id": "1184963857" 14 | } 15 | ] 16 | } -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/video.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"161500020572907", 3 | "from": 4 | { 5 | "name":"Art Names", 6 | "id":"100001387295207" 7 | }, 8 | "tags": 9 | { 10 | "data": 11 | [ 12 | { 13 | "id":"100001387295207", 14 | "name":"Art Names", 15 | "created_time":"2011-03-29T20:26:39+0000" 16 | } 17 | ] 18 | }, 19 | "name":"Just a test screen recording", 20 | "description":"Nothing special...just for testing purposes.", 21 | "picture": { 22 | "data": { 23 | "url": "https:\/\/vthumb.ak.fbcdn.net\/hvthumb-ak-ash2\/158179_161500167239559_161500020572907_64114_872_t.jpg", 24 | "is_silhouette": false 25 | } 26 | }, 27 | "embed_html":"\u003cobject width=\"400\" height=\"250\" >\u003cparam name=\"allowfullscreen\" value=\"true\" \/>\u003cparam name=\"movie\" value=\"https:\/\/www.facebook.com\/v\/161500020572907\" \/>\u003cembed src=\"https:\/\/www.facebook.com\/v\/161500020572907\" type=\"application\/x-shockwave-flash\" allowfullscreen=\"true\" width=\"400\" height=\"250\">\u003c\/embed>\u003c\/object>", 28 | "icon":"https:\/\/b.static.ak.fbcdn.net\/rsrc.php\/v1\/yD\/r\/DggDhA4z4tO.gif", 29 | "source":"https:\/\/video.ak.fbcdn.net\/cfs-ak-snc6\/80396\/785\/161500020572907_43024.mp4?oh=2d01ac0ffce931fecb8987ae02837fc6&oe=4D94E600&__gda__=1301603840_718156f2f2c257ebd7714b3b0ba5164e", 30 | "created_time":"2011-03-29T20:25:55+0000", 31 | "updated_time":"2011-03-29T20:25:55+0000" 32 | } 33 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/video_preOct2012.json: -------------------------------------------------------------------------------- 1 | { 2 | "id":"161500020572907", 3 | "from": 4 | { 5 | "name":"Art Names", 6 | "id":"100001387295207" 7 | }, 8 | "tags": 9 | { 10 | "data": 11 | [ 12 | { 13 | "id":"100001387295207", 14 | "name":"Art Names", 15 | "created_time":"2011-03-29T20:26:39+0000" 16 | } 17 | ] 18 | }, 19 | "name":"Just a test screen recording", 20 | "description":"Nothing special...just for testing purposes.", 21 | "picture":"https:\/\/vthumb.ak.fbcdn.net\/hvthumb-ak-ash2\/158179_161500167239559_161500020572907_64114_872_t.jpg", 22 | "embed_html":"\u003cobject width=\"400\" height=\"250\" >\u003cparam name=\"allowfullscreen\" value=\"true\" \/>\u003cparam name=\"movie\" value=\"https:\/\/www.facebook.com\/v\/161500020572907\" \/>\u003cembed src=\"https:\/\/www.facebook.com\/v\/161500020572907\" type=\"application\/x-shockwave-flash\" allowfullscreen=\"true\" width=\"400\" height=\"250\">\u003c\/embed>\u003c\/object>", 23 | "icon":"https:\/\/b.static.ak.fbcdn.net\/rsrc.php\/v1\/yD\/r\/DggDhA4z4tO.gif", 24 | "source":"https:\/\/video.ak.fbcdn.net\/cfs-ak-snc6\/80396\/785\/161500020572907_43024.mp4?oh=2d01ac0ffce931fecb8987ae02837fc6&oe=4D94E600&__gda__=1301603840_718156f2f2c257ebd7714b3b0ba5164e", 25 | "created_time":"2011-03-29T20:25:55+0000", 26 | "updated_time":"2011-03-29T20:25:55+0000" 27 | } 28 | -------------------------------------------------------------------------------- /spring-social-facebook/src/test/resources/org/springframework/social/facebook/api/video_watch_friends.json: -------------------------------------------------------------------------------- 1 | { 2 | "context": { 3 | "video_watch_friends": { 4 | "data": [ 5 | { 6 | "id": "726452090", 7 | "name": "Guillaume Laforge" 8 | }, 9 | { 10 | "id": "1255689239", 11 | "name": "Keith Donald" 12 | } 13 | ], 14 | "paging": { 15 | "cursors": { 16 | "before": "NjA0NDMzODY4", 17 | "after": "MTU3NjQzMDIxNQ==" 18 | } 19 | }, 20 | "summary": { 21 | "total_count": 7 22 | } 23 | } 24 | }, 25 | "id": "145634995501895" 26 | } -------------------------------------------------------------------------------- /src/api/doc-files/th-background.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/spring-attic/spring-social-facebook/57aadf32f68aa30eadd792c97386f2328ede3edd/src/api/doc-files/th-background.png -------------------------------------------------------------------------------- /src/api/overview.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | This document is the API specification for Spring Social Facebook 4 |
5 |
6 |

7 | If you are interested in commercial training, consultancy, and 8 | support for Spring Social Facebook, please visit SpringSource.com. 9 |

10 |
11 | 12 | 13 | -------------------------------------------------------------------------------- /src/dist/notice.txt: -------------------------------------------------------------------------------- 1 | ============================================================================ 2 | == NOTICE file corresponding to section 4 d of the Apache License, == 3 | == Version 2.0, in this case for the Spring Social Facebook distribution. == 4 | ============================================================================ 5 | 6 | This product includes software developed by 7 | the Apache Software Foundation (https://www.apache.org). 8 | 9 | The end-user documentation included with a redistribution, if any, 10 | must include the following acknowledgement: 11 | 12 | "This product includes software developed by the Spring Framework 13 | Project (https://www.springframework.org)." 14 | 15 | Alternatively, this acknowledgement may appear in the software itself, 16 | if and wherever such third-party acknowledgements normally appear. 17 | 18 | The names "Spring", "Spring Framework", and "Spring Social" must 19 | not be used to endorse or promote products derived from this software 20 | without prior written permission. For written permission, please contact 21 | enquiries@springsource.com. 22 | -------------------------------------------------------------------------------- /src/dist/readme.txt: -------------------------------------------------------------------------------- 1 | Spring Social Facebook ${version} 2 | ----------------------------------------------------------- 3 | Spring Social Facebook is an extension to Spring Social to enable connectivity with Facebook. 4 | 5 | To find out what has changed in this release, see 'changelog.txt' 6 | 7 | Please consult the documentation located within the 'docs/reference' directory of this release and also visit the official Spring Social home at: 8 | https://www.springsource.org/spring-social 9 | 10 | There you will find links to the forum, issue tracker, samples, and other resources. 11 | --------------------------------------------------------------------------------