starthq / search

Search provider API docs & integration implementations.
https://starthq.com
32 stars 26 forks source link

facebook integration - added events search #123

Closed vlezhnin closed 9 years ago

vlezhnin commented 9 years ago

I implemented events search for facebook integration. Search is global and is performed for all the events.

I also tried to implement search among events current user participates or organizes, but the same approach like with messages search didn't work. Requests https://touch.facebook.com/events/?q={{term}} contain all the user's events.

I had a problem when trying to show a picture of the event. Link to a picture is located in style attribute of an element, and I came up with this solution, but unfortunately didn't work:

image : {
                selector : '#objects_container .item .touchable.primary .img',
                expression : 'element.getAttribute("style").substr(element.getAttribute("style").indexOf("url(")+5,element.getAttribute("style").substr(element.getAttribute("style").indexOf("url(")+5).indexOf("\""))'
}

particularly .indexOf("\"") - It seemed that escaping backslash was removed from the expression. Using " instead of " didn't work also.

olegp commented 9 years ago

Thanks, tested to work, merging.