Question: I want to create a facebook app for android with the following functions:Login to facebook and Post to wall 
help me!
I have to check if official facebook app is installed in user's device. If yes then it will login from that app only otherwise it will open fb browser. I checked that thing but problem is that after logging through fb app it doesnot come to its own app. It continue to stay on facebook app. How to return to my own app after login to fb

Answer: 
Replace the scrollview declaration with this, 

```
UIScrollView *scrollView = [[UIScrollView alloc] init];
scrollView.frame = self.view.frame;
scrollView.scrollEnabled = YES;
scrollView.showsVerticalScrollIndicator = YES;
scrollView.contentSize = CGSizeMake(self.view.bounds.size.width, self.view.bounds.size.height * 2);
[self.view addSubview:scrollView];

```

Or like this

```
 _scrollView = [[UIScrollView alloc] init];
_scrollView.frame = self.view.frame;
_scrollView.scrollEnabled = YES;
_scrollView.showsVerticalScrollIndicator = YES;
_scrollView.contentSize = CGSizeMake(self.view.bounds.size.width, self.view.bounds.size.height * 2);
[self.view addSubview:scrollView];

```

This is because you initialized the "scrollView" and added "\_scrollView" to view.
Also add all subview in the scrollView accordingly.
```
UIScrollView *scrollView = [[UIScrollView alloc] init];
    _scrollView.frame = self.view.frame;
    _scrollView.scrollEnabled = YES;
    _scrollView.showsVerticalScrollIndicator = YES;
    _scrollView.contentSize = CGSizeMake(self.view.bounds.size.width, self.view.bounds.size.height * 2);
    [self.view addSubview:scrollView]; //making mistake here

```

here,you are making mistake you are assigning dynamic property to instance obj and adding local obj as subview...

change this line to [self.view addSubview:scrollView]; 
 to [self.view addSubview:\_scrollView];

and do one thing also alloc init \_scrollview.