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
43
44
exports.signUpConn = function(data, callback) {
var scrollView = Ti.UI.createView({
    top : 0,
    right : -1,
    left : -1,
    backgroundColor : 'transparent',
    width: '95%',
    contentWidth: 'auto',
    contentHeight : 'auto',
    layout : 'horizontal'
});

var url = "https://graph.facebook.com/" + Titanium.App.Properties.getString("cv") + "?fields=cover";
var loader = Titanium.Network.createHTTPClient();
loader.onload = function() {
    var data = JSON.parse(this.responseText);
   
    var images = [];
    for (var c = 0; c < 1; c++) {
        images[c] = {
            image : data.cover.source,
            width : 300
        };
       
  }
 function square(i) {
        var view = Ti.UI.createImageView({
            image : images[i].image,
            width : 300,
            height : 111,
            top : 5,
        });
         return view;
    }
   for (var i = 0; i < 1; i++) {
        scrollView.add(square(i));
   }   
   
}
 callback(scrollView);
    loader.open("GET", url);
    loader.send(data);

}