Permalink
Browse files

[ios-sdk] Remove photo upload from Scrumptious.

Summary: Removed photo upload capability from Scrumptious.

Test Plan:
- Ran Scrumptious

Revert Plan:

Reviewers: jacl, chrisp

Reviewed By: chrisp

CC: msdkexp@, caabernathy

Differential Revision: https://phabricator.fb.com/D583695
  • Loading branch information...
1 parent ef58c14 commit 50534105720b044cdcf8035c61fa53963ffad3ff @clang13 clang13 committed Sep 25, 2012
@@ -2,14 +2,12 @@ Scrumptious sample
Scrumptious demonstrates a "real-world" (albeit very limited) application that integrates with Facebook.
It allows a user to select from a small pre-defined list of cuisine types that they are eating, then
-tag friends who they are with, tag the restaurant they are in, and upload a photo (or take a new one)
-showing their meal. Scrumptious then allows them to post an Open Graph Action to their Timeline which will
-display the picture as well as the tagged friends and location.
+tag friends who they are with, and tag the restaurant they are in. Scrumptious then allows them to post an
+Open Graph Action to their Timeline which will display the the tagged friends and location.
The example demonstrates login/logout behavior, use of the FBFriendPickerViewController and FBPlacePickerViewController,
-uploading photos to Facebook, as well as the use of Open Graph objects and actions. While the functionality
-is quite constrained in order to be of reasonable size for a sample, the Facebook integration could serve as the
-basis for more full-featured applications.
+as well as the use of Open Graph objects and actions. While the functionality is quite constrained in order to be of
+reasonable size for a sample, the Facebook integration could serve as the basis for more full-featured applications.
If using Scrumptious as the basis for another application, please note that all of the Open Graph namespaces will need
to be updated, and a hosted service must be provided in order to serve up Open Graph Objects. In addition, the logged-in
@@ -10,7 +10,6 @@
846809C1158F85A100F2DBB9 /* action-eating.png in Resources */ = {isa = PBXBuildFile; fileRef = 846809BD158F85A100F2DBB9 /* action-eating.png */; };
846809C2158F85A100F2DBB9 /* action-location.png in Resources */ = {isa = PBXBuildFile; fileRef = 846809BE158F85A100F2DBB9 /* action-location.png */; };
846809C3158F85A100F2DBB9 /* action-people.png in Resources */ = {isa = PBXBuildFile; fileRef = 846809BF158F85A100F2DBB9 /* action-people.png */; };
- 846809C4158F85A100F2DBB9 /* action-photo.png in Resources */ = {isa = PBXBuildFile; fileRef = 846809C0158F85A100F2DBB9 /* action-photo.png */; };
84A5DA9615A68A3D00FE54AF /* Accounts.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 84A5DA9515A68A3D00FE54AF /* Accounts.framework */; settings = {ATTRIBUTES = (Weak, ); }; };
8527EC6815C9DB3800660673 /* Scrumptious.strings in Resources */ = {isa = PBXBuildFile; fileRef = 8527EC6A15C9DB3800660673 /* Scrumptious.strings */; };
8534B4DF15CC657900348ED2 /* FBUserSettingsViewResources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = 8534B4DE15CC657900348ED2 /* FBUserSettingsViewResources.bundle */; };
@@ -37,15 +36,12 @@
B9CD0A9A150EBFFB00560A93 /* facebook.png in Resources */ = {isa = PBXBuildFile; fileRef = B9CD0A99150EBFFB00560A93 /* facebook.png */; };
DD55EAAF15AB9EDF000A64B8 /* FacebookSDK.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = DD55EAAE15AB9EDF000A64B8 /* FacebookSDK.framework */; };
DD55EAB115ABA246000A64B8 /* FacebookSDKResources.bundle in Resources */ = {isa = PBXBuildFile; fileRef = DD55EAB015ABA246000A64B8 /* FacebookSDKResources.bundle */; };
- DDBF24B71590050600BAAB8F /* SCPhotoViewController.m in Sources */ = {isa = PBXBuildFile; fileRef = DDBF24B51590050600BAAB8F /* SCPhotoViewController.m */; };
- DDBF24B81590050600BAAB8F /* SCPhotoViewController.xib in Resources */ = {isa = PBXBuildFile; fileRef = DDBF24B61590050600BAAB8F /* SCPhotoViewController.xib */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
846809BD158F85A100F2DBB9 /* action-eating.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "action-eating.png"; path = "scrumptious/images/action-eating.png"; sourceTree = SOURCE_ROOT; };
846809BE158F85A100F2DBB9 /* action-location.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "action-location.png"; path = "scrumptious/images/action-location.png"; sourceTree = SOURCE_ROOT; };
846809BF158F85A100F2DBB9 /* action-people.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "action-people.png"; path = "scrumptious/images/action-people.png"; sourceTree = SOURCE_ROOT; };
- 846809C0158F85A100F2DBB9 /* action-photo.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "action-photo.png"; path = "scrumptious/images/action-photo.png"; sourceTree = SOURCE_ROOT; };
84A5DA9515A68A3D00FE54AF /* Accounts.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Accounts.framework; path = System/Library/Frameworks/Accounts.framework; sourceTree = SDKROOT; };
8527EC6915C9DB3800660673 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/Scrumptious.strings; sourceTree = "<group>"; };
8527EC6B15C9DB4A00660673 /* he */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = he; path = he.lproj/Scrumptious.strings; sourceTree = "<group>"; };
@@ -80,9 +76,6 @@
B9CD0A99150EBFFB00560A93 /* facebook.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = facebook.png; path = images/facebook.png; sourceTree = "<group>"; };
DD55EAAE15AB9EDF000A64B8 /* FacebookSDK.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = FacebookSDK.framework; path = ../../build/FacebookSDK.framework; sourceTree = "<group>"; };
DD55EAB015ABA246000A64B8 /* FacebookSDKResources.bundle */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.plug-in"; name = FacebookSDKResources.bundle; path = ../../build/FacebookSDK.framework/Versions/A/Resources/FacebookSDKResources.bundle; sourceTree = "<group>"; };
- DDBF24B41590050600BAAB8F /* SCPhotoViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SCPhotoViewController.h; path = scrumptious/SCPhotoViewController.h; sourceTree = SOURCE_ROOT; };
- DDBF24B51590050600BAAB8F /* SCPhotoViewController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = SCPhotoViewController.m; path = scrumptious/SCPhotoViewController.m; sourceTree = SOURCE_ROOT; };
- DDBF24B61590050600BAAB8F /* SCPhotoViewController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; name = SCPhotoViewController.xib; path = scrumptious/SCPhotoViewController.xib; sourceTree = SOURCE_ROOT; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
@@ -153,9 +146,6 @@
B9CD0A85150EA4DD00560A93 /* SCViewController.h */,
B9CD0A86150EA4DD00560A93 /* SCViewController.m */,
B9CD0A8B150EA4DE00560A93 /* SCViewController.xib */,
- DDBF24B41590050600BAAB8F /* SCPhotoViewController.h */,
- DDBF24B51590050600BAAB8F /* SCPhotoViewController.m */,
- DDBF24B61590050600BAAB8F /* SCPhotoViewController.xib */,
85954AE1155889A200FABA9A /* SCProtocols.h */,
8527EC6A15C9DB3800660673 /* Scrumptious.strings */,
);
@@ -182,7 +172,6 @@
846809BD158F85A100F2DBB9 /* action-eating.png */,
846809BE158F85A100F2DBB9 /* action-location.png */,
846809BF158F85A100F2DBB9 /* action-people.png */,
- 846809C0158F85A100F2DBB9 /* action-photo.png */,
856DC2171577F105001FA6A6 /* Icon-72.png */,
856DC2181577F105001FA6A6 /* Icon.png */,
856DC2191577F105001FA6A6 /* Icon@2x.png */,
@@ -252,8 +241,6 @@
846809C1158F85A100F2DBB9 /* action-eating.png in Resources */,
846809C2158F85A100F2DBB9 /* action-location.png in Resources */,
846809C3158F85A100F2DBB9 /* action-people.png in Resources */,
- 846809C4158F85A100F2DBB9 /* action-photo.png in Resources */,
- DDBF24B81590050600BAAB8F /* SCPhotoViewController.xib in Resources */,
DD55EAB115ABA246000A64B8 /* FacebookSDKResources.bundle in Resources */,
8527EC6815C9DB3800660673 /* Scrumptious.strings in Resources */,
8534B4DF15CC657900348ED2 /* FBUserSettingsViewResources.bundle in Resources */,
@@ -274,7 +261,6 @@
B9CD0A84150EA4DD00560A93 /* SCAppDelegate.m in Sources */,
B9CD0A87150EA4DD00560A93 /* SCViewController.m in Sources */,
B9CD0A96150EBF5400560A93 /* SCLoginViewController.m in Sources */,
- DDBF24B71590050600BAAB8F /* SCPhotoViewController.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -122,8 +122,7 @@ - (void)sessionStateChanged:(FBSession *)session
}
- (BOOL)openSessionWithAllowLoginUI:(BOOL)allowLoginUI {
- NSArray *permissions = [NSArray arrayWithObjects:@"user_photos", nil];
- return [FBSession openActiveSessionWithReadPermissions:permissions
+ return [FBSession openActiveSessionWithReadPermissions:nil
allowLoginUI:allowLoginUI
completionHandler:^(FBSession *session, FBSessionState state, NSError *error) {
[self sessionStateChanged:session state:state error:error];
@@ -1,32 +0,0 @@
-/*
- * Copyright 2012 Facebook
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#import <UIKit/UIKit.h>
-#import "SCViewController.h"
-
-typedef void(^ConfirmCallback)(id sender, bool confirm);
-
-@interface SCPhotoViewController : UIViewController
-
-@property (strong, nonatomic) IBOutlet UIImageView *imageView;
-@property (copy, nonatomic) ConfirmCallback confirmCallback;
-@property (strong, readonly) UIImage* image;
-
-- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil image:(UIImage *)anImage;
-- (IBAction)confirm:(id)sender;
-- (IBAction)cancel:(id)sender;
-
-@end
@@ -1,71 +0,0 @@
-/*
- * Copyright 2012 Facebook
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
-
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-#import "SCPhotoViewController.h"
-
-@interface SCPhotoViewController ()
-
-@property (strong, readwrite) UIImage* image;
-
-@end
-
-@implementation SCPhotoViewController
-
-@synthesize confirmCallback = confirmCallback;
-@synthesize imageView = _imageView;
-@synthesize image = _image;
-
-- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil image:(UIImage *) anImage
-{
- self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil];
- if (self) {
- self.image = anImage;
- }
- return self;
-}
-
-- (void)viewDidLoad
-{
- [super viewDidLoad];
- [self.imageView setImage:self.image];
-}
-
-- (void)viewDidUnload
-{
- [super viewDidUnload];
- self.imageView = nil;
- self.image = nil;
-}
-
-- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation
-{
- return (interfaceOrientation == UIInterfaceOrientationPortrait);
-}
-
-- (IBAction)confirm:(id)sender {
- if (self.confirmCallback) {
- self.confirmCallback(self, true);
- }
- [self.navigationController popViewControllerAnimated:true];
-}
-
-- (IBAction)cancel:(id)sender {
- if (self.confirmCallback) {
- self.confirmCallback(self, false);
- }
- [self.navigationController popViewControllerAnimated:true];
-}
-@end
Oops, something went wrong.

0 comments on commit 5053410

Please sign in to comment.