public boolean addFavoritePost(int nPost) {
    fFeed = getSharedPreferences("DATA", 0);
    if (postJsonArray == null) {
      postJsonArray = new JSONArray();
    }
    HNPost temp = mFeed.getPosts().get(nPost);
    if (!isPostinFavorite(temp.getURL())) {
      // New hnPOST
      JSONObject jsonObject = new JSONObject();
      try {
        jsonObject.put("url", temp.getURL());
        jsonObject.put("title", temp.getTitle());
        jsonObject.put("urlDomain", temp.getURLDomain());
        jsonObject.put("author", temp.getAuthor());
        jsonObject.put("postID", temp.getPostID());
        jsonObject.put("commentsCount", temp.getCommentsCount());
        jsonObject.put("points", temp.getPoints());
        jsonObject.put("upvoteURL", null);
      } catch (JSONException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
      // put in jsonArray
      postJsonArray.put(jsonObject);
      fFeed.edit().putString("postData", postJsonArray.toString()).commit();

      favoritePosts.addPost(temp);
      return true;
    }
    return false;
  }