Thursday, March 25, 2010

update 25th March

I have figured out the problem of getelementbyclass , that <\tr> or<\td> tag should be put into a table . i also update the two buttons


Wednesday, March 24, 2010

update 23th March

I change the "share" button on borrower page. use steamPublish method instead of showShareDialog. In the new function , it is more like to send a new feed with picture and link .
It can automatically get the picture's source address and link from a certain page.

There are javascript method i have not used before . But they are not very hard except get a Text from a certain Class .

<\tr\><\td class="a1">Borrower Name<\/td><\/tr>
<\tr><\td class="a2">Maria Coy<\/td> <\/tr>
<\tr><\td class="a1">Location<\/td>
<\tr><\td class="a2">Tono<\/td> <\/tr>

this is a piece of html code . I need to get "Maria Coy" and "Tono" and display them on facebook by sending a feed . I know how to get them by "ID" or other attributes .but when i try to use the same way to get this. it cannot work.

function ver() {
var allElems = document.getElementsByTagName('*');

for (var i = 0; i < allElems.length; i++) {
var thisElem = allElems.item(i);
if (thisElem.className && thisElem.className == 'a2') {//


new "share" button link:

Sunday, March 21, 2010

update 22th Marth

Borrower page (step 1)
share page , we can write title and statement (step 2)

facebook home page (step 3)

Thank you page(step 1)

login page(step 2)

after login refresh page (step 3)

write feed stroy(step 4)

facebook home page (step 5)


I have finished to change these two pages and did some test . there is still some problem

1. if no login button shown on the page , when user do not login the facebook when they press "share with facebook" button ( it is a send feed function ) in THANK YOU page . application will allow user to login . but after log in they have to press the button again to send the feed .

So totally user need to press twice. that is not what we want , but it seem like we have to do it.

2. in the THANK YOU page , we need find picture's recouse and location if we want to attach it .that still need to ask company to show me where to find it.

3. the share button only share the link ,that need to be changed I guess.

update 15th March

Today , i went to the company to meet Di Bowles who is the manager of . I show the sample application to them and talk about the how to use their server to test .

they give me 2 pages which they want to add the facebook button in and tell me how these buttons work .

first one is a share button which could appear in "Borrower" page . That page is telling the user the backgroud information about these people who need help and how much need and so on .
the "share" button is to share the link to facebook , is better can display a picture and leave some comment and so on . So only use facebook's "share" API cannot make this happen .that should use others .

Second one is a post feed button on "Thank you" page . On that page , user already finish the loan or donation . this page is last step to display all information to user . The facebook button will send a new feed to the facebook , to tell user's friends how he/she help them .
they want the button can handle "login" and "send feed" function . Also they want the feed contain the user's name ,borrower's name and nationality. Unfortunatly , facebook just claimed that the API will not supply templage any more . Probably, they make a better one for users .

One more thing is the website is not created by the company , so i have to work with the person who made the website whe embed the application into the real website .

There is till a lot work to do .

Wednesday, March 10, 2010

update 10/03/2010

what i have done so far :

I have create a similer app on which is the Chinses version facebook and test on my server .

user can log in by the renren account , share video , and send new to the own page.
but the problem is that the server is in China , so when i tried use that server to test facebook app, then is was been rejected , just show the "cannot find page ". At first , i thought it would be some thing wrong in my code . Now i understand the reason cause facebook cannot call the server in China . So i try to set another server , probably use the usyd's server.

I am still working that now .

I have create a new app on facebook called goodreturn .

Wednesday, March 3, 2010

steps of create the application

step1 create a new application in facebook
fellowing the tutorial of facebook wiki, that would be easy. To get the API key and secret key.
set the connet URL ,domain URL and some app profile.

step2 open a server for the app test.
this server is actully for uploading the webpage code by ftp.

step3 implement and test the functions
fellow the functional requirements . login ,loginout ,share ,send feed , invite friend and so on.

step4 add the code in to the webpage
to upload the real webpage code and backgroud code to achieve these functions.

step5 Test the new website and app

requirments of goodreturn website

The requirments of this application is not very complex.

Due to the facebook API, we can achieve many function we want .

R1. The website should allow user to login by facebook account .
The systme should check the window or the user's login status .
if use already login facebook, then they can login in directly.
if not ,then window would pop up a new web page for user to type facebook accunt .
if user dont have a facebook account , then they can registe one there.
Of course users can their goodreturn account to login as well .

R2 The website should allow user to logout goodreturn and facebook as the same time

R3. The website should allow user send feed (words ,pictures) to their own facebook page.

when user finish a donation or lent , they can choose to send a message or a feed to their wall to let their friend know that . system would add a picture and the number of money to the message automatically , But if the user dont want to attach the picture or the number of money they can change that. Also user can write any thing in the message.

R4. The website should allow user share vidao and pictures with their facebook friends.
The user can add some statement to the share vidao or pictures if they want .

R5. The application should allow user to access to website derictly from facebook.

*R6. The applicatoin should allow user to invite their friends to add the application.

So far ,these requirments would help the goodreturn to be konwn by the public .

Facebook application analysis

This application is trying to make a connection between the facebook and

They want to let the facebook user can access to by the application.

Then the user can use the facebook account to login to the goodreturn. So the goodreturn can

use facebook to make them more famous and attract more users to visit their website.

That is a very good thing cause their work for charity organization. The more people visit the

website the more chance they can get money and lent them to the people who need .

One more thing , because the website have the donate function which would involve with money.

So the code should be paid more attention on the safety and security .

Monday, March 1, 2010

Start the project

I already set up a test server for the facebook project.Due to the internet police of Chinese government ,I just use the simlar website ( to test the code and get to understand the process of create a facebook project.

I create the prject named "Good return " and read the document of how to create connection to a website. ( use .Net to write the website. I need to get to know how to write the project using the same language .